Forums

[Plugin: Role Scoper] Doesn't seem to work w/ WP Hide Dashboard plugin (4 posts)

  1. Woo2k
    Member
    Posted 4 years ago #

    I'm using the P2 theme and I assign all users as Authors so they can post. However, I don't want them to have access to the full dashboard. So, I change their roles to "Subscriber" and I use Role Scoper (RS) to give them access to post as Authors. But after making this change in RS, the WP Hide Dashboard plugin recognizes them as full-blown authors again. Role Scoper offers a lot more configuration options than WPHD, but I'm not sure if any of them can help me with this problem. Any ideas?

  2. kevinB
    Member
    Posted 3 years ago #

    I don't know what WPHD is keying on, but a slightly ugly workaround might be to give your user the Post Author role separately for each category instead of blog-wide via a General Role.

    If WPHD still sees the user as an Author, there may be something I can do to adjust capabability filtering on the dashboard.

    I'll follow up on this after I look into it myself.

  3. kevinB
    Member
    Posted 3 years ago #

    You can correct this by changing three lines of code in WP Hide Dashboard.

    Change each instance of
    ! current_user_can('edit_posts')

    to:
    ( in_array( 'subscriber', $current_user->roles) || ! current_user_can('edit_posts') )

    You will also need to add the following line at the top of function wphd_hide_help_link() {:
    global $current_user;

    These changes mean that the hiding will be done if the user lacks the edit_post capability or if they have a WordPress role of Subscriber. As such, it will not adversely affect the usage of WPHD without Role Scoper.

  4. theandyreport
    Member
    Posted 3 years ago #

    Just an FYI for anyone else who stumbles upon this...

    I saw this post and got nervous about installing WP Hide Dash, even though it was exactly what I was looking for. I went for it though and had no troubles at all. I did not have to edit any code in the Dashboard script.

    I'm using Role Scoper to elevate subscribers -- allowing them to post in select categories only. Activating WPdash did not break this. Also, regular subscribers (not elevated through RS) see only their profile on login, as expected.

    Maybe this problem is fixed? Give it a try... dont be shy!~

Topic Closed

This topic has been closed to new replies.

About this Topic