Change WordPress user roles and capabilities Forums Give user access to plugin – how to Role to edit a page only without losing admin menu

Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #3047
    kdipa
    Participant

    Hello, i have a role for users (PR Department) and i want to allow them to edit a page on the site. when i do it from (post edit) or (edit access). the user cant use the admin menu. and when i go to the user himself under (Posts/Pages/Custom Post Types Editor Restrictions) i see it sellect (allow) for the page ID . but its ignoring (Look at roles).

    so when i select ( Look at roles) the admin menu works fine again.
    help please ?

    #3049
    Vladimir
    Keymaster

    Hi,

    Give me more details, what is wrong with admin menu? Screenshots are very appreciated. I may look on your settings on-line if you send admin credentials to support [at-sign] role-editor.com

    ‘Allow’ is a default action at the user level. It works together with restriction set for this user at the role level, but if you selected the same action ‘Allow’ for role. Plugin should use both restrictions data (from the user level and the role level) simultaneously. When you select ‘look at roles’, plugin ignores restrictions selected at a user level.
    When you select different actions at user and role levels, user level has a priority.

    #3053
    kdipa
    Participant

    hello, this is the full story :

    #3055
    Vladimir
    Keymaster

    Thanks for the clarification.

    Edit restriction is applied by default for all post types. As you allowed to edit just 1 page, user can not edit posts. But it’s possible to exclude selected post type from the global restriction. Use this filter ure_restrict_edit_post_type.

    #3067
    kdipa
    Participant

    Hello, i have added (ure_restrict_edit_post_type) to the (PR role) and nothing changed. and tried it on the user himself.
    Same as the pictures above.

    #3069
    Vladimir
    Keymaster

    What did you really do?
    You should use the sample code from this link and insert it into the active theme’s functions.php file. Did you?

    #3070
    kdipa
    Participant

    Hello, i didnt at the first time .
    i did added the code in the child theme active functions.php.
    and tried it again, this time the admin panel workking fine, but it still cant edit the (page ID1265).

    when i try and edit it by link :
    http://ikdipa.com/wp-admin/post.php?post=1265&action=edit

    i got this error
    “Sorry, you are not allowed to edit this item.”

    and thanks for the extream fast reply 😀

    #3071
    Vladimir
    Keymaster

    Is this user the author of the page id 1265? ‘edit_others_pages’ capability is required in other case.

    #3072
    kdipa
    Participant

    no hes not the author . i just added “edit_others_pages” to him . still he cant access .

    #3073
    kdipa
    Participant

    i did added “Edit published pages” its work now . Thanks 😀

    #3074
    Vladimir
    Keymaster

    Right. User should have the basic permissions. ‘edit restrictions’ just narrow them according to your input.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.