Advanced search  

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

Pages: [1]   Go Down

Author Topic: Bug: USER_ADMIN_MODE issue  (Read 3485 times)

0 Members and 1 Guest are viewing this topic.

SNo0py

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Bug: USER_ADMIN_MODE issue
« on: July 24, 2006, 09:47:11 am »

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
« Last Edit: July 24, 2006, 10:40:38 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bug: USER_ADMIN_MODE issue
« Reply #1 on: July 24, 2006, 10:40:25 am »

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.
Logged

SNo0py

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Bug: USER_ADMIN_MODE issue
« Reply #2 on: July 26, 2006, 01:57:28 pm »

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.
Logged

Nibbler

  • Guest
Re: Bug: USER_ADMIN_MODE issue
« Reply #3 on: July 26, 2006, 02:08:00 pm »

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

Quote
When 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).
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bug: USER_ADMIN_MODE issue
« Reply #4 on: July 26, 2006, 04:47:05 pm »

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

SNo0py

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Bug: USER_ADMIN_MODE issue
« Reply #5 on: August 16, 2006, 01:44:32 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Bug: USER_ADMIN_MODE issue
« Reply #6 on: August 16, 2006, 02:10:09 pm »

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.

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.