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: Viewing pictures immediately without approval  (Read 5395 times)

0 Members and 1 Guest are viewing this topic.

gianso

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Viewing pictures immediately without approval
« on: May 19, 2011, 05:04:01 pm »

Recently, the considerable increase in traffic in our image gallery (http://www.naturavventura.it/cpg/) I turned in some users Registered users Administrators. Now when they upload pictures, despite being set in the group, Public Upload Album, the pictures they need approval, these will be published immediately. Strange no? Why?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Viewing pictures immediately without approval
« Reply #1 on: May 19, 2011, 05:06:41 pm »

Your issue is the the following: you have some users in the Administrators group that upload pictures to your gallery, which will be published immediately, although they need approval as per group manager settings?
Logged

gianso

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: Viewing pictures immediately without approval
« Reply #2 on: May 19, 2011, 05:23:49 pm »

Yes, excuse my english google
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Viewing pictures immediately without approval
« Reply #3 on: May 19, 2011, 06:30:03 pm »

Counter question: why should pictures of administrators need approval? They could approve them immediately anyway. We recommend to give no one admin privileges who doesn't necessarily need it.
Logged

gianso

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: Viewing pictures immediately without approval
« Reply #4 on: May 19, 2011, 10:20:13 pm »

Why is provided for the group administrator approval if it is not possible? We have given the role of managers to employees who help us maintain the portal.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Viewing pictures immediately without approval
« Reply #5 on: May 20, 2011, 10:42:23 am »

The users in the admin group have a special mode 'GALLERY_ADMIN_MODE'. You can toggle that mode by clicking 'Show/hide admin controls' in the menu. If the user is in GALLERY_ADMIN_MODE, pictures will always be approved. If you want to change that behavior, open include/picmgmt.inc.php, find
Code: [Select]
    if (GALLERY_ADMIN_MODE) {
        $approved = 'YES';
    } elseif (!$USER_DATA['priv_upl_need_approval'] && $category == FIRST_USER_CAT + USER_ID) {
        $approved = 'YES';
    } elseif (!$USER_DATA['pub_upl_need_approval'] && $category < FIRST_USER_CAT) {
        $approved = 'YES';
    } else {
        $approved = 'NO';
    }
and replace with
Code: [Select]
    if (!$USER_DATA['priv_upl_need_approval'] && $category == FIRST_USER_CAT + USER_ID) {
        $approved = 'YES';
    } elseif (!$USER_DATA['pub_upl_need_approval'] && $category < FIRST_USER_CAT) {
        $approved = 'YES';
    } else {
        $approved = 'NO';
    }
Logged

gianso

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43
Re: Viewing pictures immediately without approval
« Reply #6 on: May 21, 2011, 12:20:45 pm »

Thanks for the technical solution, but if it is just the malfunction detected, why not put the change in the next update?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Viewing pictures immediately without approval
« Reply #7 on: May 21, 2011, 02:17:43 pm »

There is no malfunction. Coppermine works exactly as designed. The GALLERY_ADMIN_MODE overwrites some settings, i.e. grants the user admin privileges. If the admin mode is disabled, all 'regular' settings/restrictions apply. That's what I already tried to explain you.
Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 19 queries.