code to restrict display of x-dashboard module unless logged in as admin level (4 posts)

  1. syncbox
    Posted 10 years ago #

    OK, it comes to me that rather than hide the dashboard from subscribers, it would be better to not display the sensitive stuff (a module with links to site documentation, other stuff for admin only) if the logged in user is not admin level.

    I know I could dig around and find a bit of code that does that, but if someone can point me to it, that would be awesome.

  2. moshu
    Posted 10 years ago #

    I thought WP is doing this already. Did you try to login as a "Subscriber"? You can't do anything in the dashboard...
    Also, you may want to trake a look at the Role Manager plugin: http://redalt.com/wiki/Role+Manager

  3. syncbox
    Posted 10 years ago #

    I'm using the x-dashboard plugin. And yes, I tried logging in as a subscriber and you are right - you cannot write, edit, etc.
    But I want to post a link to a document (with sensitive data) and other links that the general public need not have access to... and it doesn't stop that from being accessed.

    I tried messing around with permissions on the file and ended up screwing up my Dreamhost site so that it doesn't even display at this point - and of course, Dreamhost is SLOOOOOWWWW on responding to my support/callback request, so the site is still down (18+ hrs and counting).

    So, what I'd like is some way to say

    if user level = 10, then display this link else don't.


  4. jasdonle
    Posted 9 years ago #

    I'd like to bump this up since i'm looking for a solution to the exact same issue.

Topic Closed

This topic has been closed to new replies.

About this Topic