Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Can I allow a specifig group to use 'Admin Tools'  (Read 3580 times)

0 Members and 1 Guest are viewing this topic.

Totoro

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 17
Can I allow a specifig group to use 'Admin Tools'
« 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 ... :(
« Last Edit: January 13, 2005, 10:02:11 am by GauGau »
Logged

Nibbler

  • Guest
Re: Can I allow a specifig group to use 'Admin Tools'
« Reply #1 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)
Logged

Totoro

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 17
Re: Can I allow a specifig group to use 'Admin Tools'
« Reply #2 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 :)
« Last Edit: January 13, 2005, 09:39:07 am by Totoro »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Can I allow a specifig group to use 'Admin Tools'
« Reply #3 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
Logged

Totoro

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 17
Re: Can I allow a specifig group to use 'Admin Tools'
« Reply #4 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 ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.