Bug: USER_ADMIN_MODE issue Bug: USER_ADMIN_MODE issue
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Bug: USER_ADMIN_MODE issue

Started by SNo0py, July 24, 2006, 09:47:11 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

SNo0py

Hello out there!
The problem for me is that if an admin goes to "User mode" he does not see the "user admin menu" (Create / order my albums, Modify my albums, My profile, Sort my pictures), so it's impossible for an admin user to actually work with the gallery.

The bug is in init.inc.php, I had to modify the following line
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);
to
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && !GALLERY_ADMIN_MODE);

By removing the $USER['am'] the admin now sees the menu like any other ordinary user does.

Please integrate this in the next release, thanks!

SNo0py

Joachim Müller

Not a bug, but expected behaviour. The "user mode" is meant only to enable you to see how your gallery looks like with the admin controls during the design stage of your custom theme. During regular operation, never go to user mode. If you actually want to see how your gallery loks for regular users, create a non-admin test user account and log in with it (preferably using another browser). This has been asked and answered many times, make sure to search the board before posting wannabe-bug-reports. This is being explained in the docs as well. The "user mode" button has been renamed in the devel version anyway to stop confusion.
The suggested code changes do not apply. You (as an admin) shouldn't use user galleries, the whole site is yours - don't restrict your experience.

SNo0py

Actually you are right - the button's name is very confusing.
But I still don't agree that I'm not able to see the buttons when I wanna see what the user sees.

And I was searching this forum and the manual, no luck, this behaviour is not clearly indicated there.

Nibbler

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_user_mode

QuoteWhen you are in user mode you are still logged in as an admin user, but the admin controls (the admin menu bar etc.) are hidden from the screen to give you a basic preview of what the page would look like for "regular users". However (as you still are logged in as admin), certain permissions and options in user mode will still look the same as if you were in admin mode; you can not use "User Mode" to see what a non-admin user is actually allowed to see. To see what a casual visitor can see and do on your site, simply log out. To see what a registered user can see and do on your site, create a test user account (non-admin) and log in with this particular user (when doing this it is recommended that you use two different browsers, NOT two instances of the same browswer, to view your site so you can stay logged in as admin on one and view what regular users see while making changes in admin mode. You will have to refresh the non-admin mode screen to see what changes you incorporated).

Joachim Müller

Shouting "bug" is not a bright idea - in fact you just didn't read the docs thoroughly.

SNo0py

Actually, if a lot of users are asking this the behaviour should be changed. It makes sense to separate admin and user functions. Not to limit the experience, but to ensure the admin is aware what he is doing.

Joachim Müller

And indeed this has been changed for the devel version (the one that is going to be cpg1.5.x): we relabelled the admin mode / user mode toggle there to make it absolutely clear what the intended use is.
However: administering a complex software like coppermine is not trivial. When in doubt, users should read the documentation provided (that's why we wrote it in the first place).
I agree that things that cause a lot of trouble (i.e. questions that are being asked very often on the support board) need changing in future versions, and that's what we constantly do. However, the admin mode / user mode toggle won't break a gallery when used improperly, it just keeps the site-admin from doing what he intends to do, forcing him to read the feature up in the docs. It's not a show-stopper.

Quote from: SNo0py on August 16, 2006, 01:44:32 PM
It makes sense to separate admin and user functions. Not to limit the experience, but to ensure the admin is aware what he is doing.
This already is the case, not sure what you're refering to. Everything the admin can do exclusively is being triggered from the admin menu items, which differ from stuff users can do visually.