Viewing pictures immediately without approval Viewing pictures immediately without approval
 

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

Viewing pictures immediately without approval

Started by gianso, May 19, 2011, 05:04:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gianso

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?

Αndré

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?

gianso


Αndré

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.

gianso

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.

Αndré

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
    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
    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';
    }


gianso

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

Αndré

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.