forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: Totoro on January 12, 2005, 01:15:43 pm

Title: Can I allow a specifig group to use 'Admin Tools'
Post by: Totoro on January 12, 2005, 01:15:43 pm
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
Code: [Select]
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 ... :(
Title: Re: Can I allow a specifig group to use 'Admin Tools'
Post by: Nibbler on January 12, 2005, 01:24:06 pm
Yes, you modify the GALLERY_ADMIN_MODE check at the start of the file to be group based. ie

Code: [Select]
if ($USER_DATA['user_group'] != 5)
Title: Re: Can I allow a specifig group to use 'Admin Tools'
Post by: Totoro on January 12, 2005, 03:08:31 pm
Thanx a lot ;)

The solution was :
Code: [Select]
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 :)
Title: Re: Can I allow a specifig group to use 'Admin Tools'
Post by: Joachim Müller on January 13, 2005, 09:47:54 am
edit themes/yourtheme/theme.php, find
Code: [Select]
// 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
Title: Re: Can I allow a specifig group to use 'Admin Tools'
Post by: Totoro on January 13, 2005, 09:55:16 am
edit themes/yourtheme/theme.php, find
Code: [Select]
// 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 ;)