Make a user only admin on certain site's Make a user only admin on certain site's
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Make a user only admin on certain site's

Started by rgroen, October 18, 2004, 07:04:54 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

rgroen

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.

Joachim Müller

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

rgroen

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

Joachim Müller

example:if (!(GALLERY_ADMIN_MODE) && USER_NAME != 'john doe') {
     cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}

Joachim