coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: rgroen on October 18, 2004, 07:04:54 PM

Title: Make a user only admin on certain site's
Post by: rgroen on October 18, 2004, 07:04:54 PM
Hey,

Everone knows the following code:

if (!(GALLERY_ADMIN_MODE)) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);

But how can I make my script in that way so I can give users permission to visit some page's.

I want to give a person rights to visit one page but dont want to give him the rights for administration.
Title: Re: Make a user only admin on certain site's
Post by: Joachim Müller on October 18, 2004, 07:15:40 PM
add another switch condition into the if statement, separated with boolean operators OR (||) or AND (&&). Depending on the stuff you want to allow, you may have to add such switches in different files.

Joachim
Title: Re: Make a user only admin on certain site's
Post by: rgroen on October 18, 2004, 07:27:48 PM
Quote from: GauGau on October 18, 2004, 07:15:40 PM
add another switch condition into the if statement, separated with boolean operators OR (||) or AND (&&). Depending on the stuff you want to allow, you may have to add such switches in different files.

Joachim

Hey joachim,

Can you tell me wich statement this should be?

Thnx
Title: Re: Make a user only admin on certain site's
Post by: Joachim Müller on October 18, 2004, 11:02:43 PM
example:if (!(GALLERY_ADMIN_MODE) && USER_NAME != 'john doe') {
     cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}

Joachim