Hiding what an admin can see

Hi.

Is there anyway or an easy way of hiding what a admin ( other than a master admin account ) can see on the admin pages?

For example if I set a user so they can only upload images I want to hide the rights check boxes and manage albums toggle...

Is there a way of including an extra css file if a user only has limited rights for example.

Any help welcomed.

Sp

Comments

  • I came up with a somewhat crude way to do this.

    I went through and put a loop (see below) around all options that I did not want the other admins to see.

    `

    if($_zp_current_admin['user']=="my_username") {

    }

    `

    So you can just hide all the tabs that you don't want others to see. I did this with plugins and themes since I don't want the other admins to tinker with it.

  • You should read this from the User Guide: http://www.zenphoto.org/2008/07/an-overview-of-zenphoto-users/

    What users can see is all dependent on the user's rights, including the tabs on the back-end. If you don't want the user to see something in particular, then don't give the user those rights.
  • Ok...

    "user A" has the following rights "Album" and "upload"... however on "user A's" admin page the check boxes are still displayed, They cant select anything but they are still displayed nonetheless...

    I just want to find a way to hide those checkboxes from being displayed...

    Any thoughts?

    SP
  • Ahh, to remove that from the user's admin page you would indeed have to hack the file `admin-users.php`. However, do be aware that when hacking core files, you will need to re-apply any changes after every update to Zenphoto.
  • Why on earth would you want to hide from the user what rights he has? Are you concerned that he will complain to you about not having enough priviledges?
  • Got it in one... Not so much concerned as fed up with answering the same question from what has so far been every user :)

    the question "I cant seem to change my privilages... Is it not working?".

    It would just make life a bit easier if it was not there :)

    the "manage albums" toggle was easy enough to remove from the user's page with a bit of css and still keep it on the master admin... and I would do the same with the check boxes but there is nothing for me to get hold of with css...If I remove it from one page it gets removed from all...

    Sp
  • acrylian Administrator, Developer
    Well, I would think that briefing your users beforehand would be quite normal.. I mean it is quite normal that users can't change their own privileges if it is not their own site, isn't it?
  • We do tell them what they can and cant do... But dont forget we are dealing with the human ability to not see exactly what is written in front of them...
  • acrylian Administrator, Developer
    Do you have that much users that answering a small question is just that problem? Why not send a group mail to them all?
  • Its sorted albeit a bit belt and braces...

    I have put "N/A" on the labels in "lib-auth.php" next to the ones that they dont have access to... it will say the same in the master admin section but we know what we are doing so its ok :)

    But to answer your question, We are hoping to have a lot of users, and yes rather than answering the same question over and over again it would be easier to just not have to answer it... One user asked the same question in at least 10 different ways recently...

    SP
  • acrylian Administrator, Developer
    One user asked the same question in at least 10 different ways recently...
    That does either not really speak for the user or your explanations..;-)
  • We can add a note to the page saying that you must have admin priviledges to change those items.
Sign In or Register to comment.