Can I allow a specifig group to use 'Admin Tools' Can I allow a specifig group to use 'Admin Tools'
 

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

Can I allow a specifig group to use 'Admin Tools'

Started by Totoro, January 12, 2005, 01:15:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Totoro

Hello :)

On the gallery I created, I made only one group allowed tu upload images. I, as admin, will not upload images (this gallery is for my nephew, and only his dad can upload images).
To make exactly what I wanted to do, I made the pathtocoppermine/index.php?cat=10003 page, the homepage of the gallery, visible by guests.
So, without knowing it, visitors see the personal gallery of the only uploader.

Uploading is not problem, except for the titles of the images, that you've got to write them handly, one by one.

So ther is my question : is it possible to allow a spécific group to access the 'Admin Tools' to batch-rename the images titles with the file names ?
I know that I can suppress the line if (!GALLERY_ADMIN_MODE) die('Access denied'); in the util.php page, but in that case everybody could access to the util.php page and should mess it up ... :(

Nibbler

Yes, you modify the GALLERY_ADMIN_MODE check at the start of the file to be group based. ie

if ($USER_DATA['user_group'] != 5)

Totoro

#2
Thanx a lot ;)

The solution was :
if (!(GALLERY_ADMIN_MODE || ($USER_DATA['user_group'] == 5))) {
    cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}


Last question : Can you tell me what function/file is used to show the edit album menu (aka 'Create/order my albums', 'Modify My Ambums" and 'My profile'), I'd like to add a 'Admin Tools' button :)

Joachim Müller

edit themes/yourtheme/theme.php, find// HTML template for user admin menuand add the link beneath it.
Warning: you shouldn't make the admin tools available for "regular" users (or even guests) - they can easily break your whole coppermine site. There is a valid reason why the admin tools are restricted to the admin only! Do above mentioned changes at your own rsik, don't say we didn't warn you.

Joachim

Totoro

Quote from: GauGau on January 13, 2005, 09:47:54 AM
edit themes/yourtheme/theme.php, find// HTML template for user admin menuand add the link beneath it.
Warning: you shouldn't make the admin tools available for "regular" users (or even guests) - they can easily break your whole coppermine site. There is a valid reason why the admin tools are restricted to the admin only! Do above mentioned changes at your own rsik, don't say we didn't warn you.

Joachim

Thanx Gaugau for the tip and the advise. ;)
I'll made the Admin Tools only available for 1 person wich is in a spécific group, and not for regular users or visitors. I do that because I wanted he was allowed to rename the titles by filenames, but not allowed to access the main admin config pages. I will make an only link to util.php ;)