Change WordPress user roles and capabilities Forums Search Search Results for 'Force custom post types to use their own capabilities'

Viewing 15 results - 1 through 15 (of 38 total)
  • Author
    Search Results
  • #8662
    VC Team
    Participant

    With the module “Force custom post types to use their own capabilities” enabled, when I create a new CPT, admins cannot see it. To fix that, I have to go to Users > User Role Editor, select any role and click “Update” (without making any changes). Then suddenly admins can see the new CPT.

    On my site, admins should always be able to see everything. Is there a setting I can use to adjust that behavior or is that just how it works?

    Thank you!

    Regnalf
    Participant

    After the release of Advanced Custom Fields 6.2 there is a new section to create option pages directly in the backend.

    Unfortunately there is a problem when the option “Force custom post types to use their own capabilities” is active. Although you are logged in as administrator, and even have permission according to the permissions list, you cannot access the options page list in ACF.

    Apparently ACF doesn’t get along when its option pages are given their own permission names, which are obviously custom post types.

    #8274
    Vladimir
    Keymaster

    I suppose that URE at your site has active options related to the custom post type, like:
    – Activate “Create” capability for posts/pages/custom post types,
    – Force custom post types to use their own capabilities.
    And current user role did not contain needed capabilities at the moment when you try add/edit schema.

    Vladimir
    Keymaster

    Hi,

    For example you have CPT ‘staff’. With the “Force custom post types to use their own capabilities” option turned ON, it’s custom term related permissions are changed to
    ‘assign_staff_terms’ – allow to select category checkboxes at the CPT edit page
    and
    ‘edit_staff_terms’ – allow to use ‘Add new category’ link at the custom categories meta box.
    Try to find these capabilities between ‘Custom capabilities’ group and grant to a selected role.

    mutualite
    Participant

    Edit: Confirmed through tests that unchecking the “Force custom post types to use their own capabilities” gives everybody back the option to manage CPT Categories. However it also means each and every role has access to all contents types, and that editing a permission for a specific contents type give the same one on every CPT. Made to work like this when the option above is not checked, but an issue for us.
    Did I overlook a way to have specific roles edit custom types categories ? Else how to solve this ?

    Thanks.

    mutualite
    Participant

    Hello,

    Our site has evolved to have more custom contents (CPT). Some new taxonomies (categories) are associated with them, outside the native taxonomies from posts.
    We have realized somes roles we created seem to have lost the ability to edit those taxonomies associated with custom types.
    Because that taxonomy is required, users cannot save nor publish new content…

    Oddly enough, people connected with that role can indeed see those taxonomies on the right handside, but in a “read-only” (greyed-out checkboxes) mode.
    There seems to be no related checkoxes in our roles to allow their edition (unlike an “Edit categories” in the standard Posts section).

    Could this be related to the “Force custom post types to use their own capabilities” option we checked to solve another issue we had, which was that all roles had the same access to all contents, whereas we need some to only see specific custom types ?
    I have seen similar issues in this forum but no answer that seemed to solve mine.

    Thanks.

    #8185
    Vladimir
    Keymaster

    Hi,

    URE Pro does not support wp-cli and any other CLI commands. If URE Pro is involved, You may temporally deactivate it – just rename it’s folder /wp-content/plugins/user-role-editor-pro to something other. It will be executed and will be automatically deactivated on ‘Plugins’ page opening.

    URE Pro stores it’s settings in the database:

    
    SELECT * FROM wp_options WHERE option_name='user_role_editor';
    

    So you may change URE Pro settings replacing option_value field value.
    For example, find
    s:36:”force_custom_post_types_capabilities”;s:1:”1″;
    and replace the final 1 with 0 in order to switch OFF the option “that CPT use their own permissions”.

    #8072
    Vladimir
    Keymaster

    Compare if you have the same choice for “the Settings->User Role Editor->Additional Modules” ->”Force custom post types to use their own capabilities” option at all 3 different sites.

    Mike73
    Participant

    … ok, we’ve found the reason (the option).

    It’s the option “Force custom post types to use their own capabilities” under URE-“Additional Modules” -> “Content editing restrictions”

    If she activated, then we’re no access to “Avada Library Elements”.

    The question is, for what is this option useful/what effect has she/when (in which cases) we need this option?

    Хорошего дня и спасибо! M.

    Vladimir
    Keymaster

    Hi,

    Starting from version 4.59.2 URE

    * Update: Option “Force custom post types to use their own capabilities” replaces default capabilities for the custom taxonomies also.
    It takes the slug of the 1st post type associated with such taxonomy (e.g. ‘video’) and builds own capabilities this way: manage_terms->manage_video_terms, edit_terms->edit_video_terms, delete_terms->delete_video_terms, assign_terms->assign_video_terms.

    So search between custom capabilities similar to the named above, but with your custom post type inside and grant them to your role.

    #7407
    Vladimir
    Keymaster

    Hi,

    One of the updates included into the recent version 4.59.2:
    – Option “Force custom post types to use their own capabilities” replaces default capabilities for the custom taxonomies also. It takes the slug of the 1st post type associated with such taxonomy (e.g. ‘video’) and builds own capabilities this way: manage_terms->manage_video_terms, edit_terms->edit_video_terms, delete_terms->delete_video_terms, assign_terms->assign_video_terms. URE automatically adds such capabilities to the ‘administrator’ role. You have to grant these new capabilities to other roles manually.

    Filter custom capabilities by word ‘terms’ via ‘Quick Search’ and grant needed capabilities to needed role.

    miliaris
    Participant

    Hi,
    I have same puzzle to solve..
    I have a User Role set to edit, create, remove all posts of transparency (custom post type).
    I have done this activeting “Force custom post types to use their own capabilities”.
    To the same Role/User I have to let him edit 2 pages (classic wp pages).
    If I add the ID’s on Edit Posts, he cannot modify anything but those 2 pages.

    I don’t see any codes in your link above.
    I need to operate in functions.php? Can you give me a hint?
    Thank you

    #7360
    Vladimir
    Keymaster

    Try to block unneeded admin menu items using “Admin menu blocking” add-on.

    Btw., I work on add custom taxonomies to the code executed for the URE’s option
    “Force custom post types to use their own capabilities”. This will replace ‘edit_posts’ for such taxonomies with ‘assign__terms’ capability. So you will not need to add ‘edit_posts’ for custom post types. I plan to add this to the next udpate.

    alicorn
    Participant

    Hi Vladimir,

    Sorry for getting back to you so late. But yes, I do have some URE additional modules.

    Namely:

    Activate Administrator Menu Access module
    Activate “Create” capability for posts/pages/custom post types
    Activate user access management to editing selected posts, pages, custom post types
    Force custom post types to use their own capabilities

    I’ll look at your post, as I’m familiar with SQL. Thanks for your help!

    Best regards,

    Andrija

    AB-FlatC
    Participant

    Hello, I have a pro version of the plugin. My issue is that the editors can’t see others media attachments in the library.

    – I’ve tried to add the filter you provided in functions.php

    ure_attachments_show_full_list

    – Result is the same

    additional note: I have ‘Content editing restrictions’ activated:

    “Create” capability for posts/pages/custom post types
    Activate user access management to editing selected posts, pages, custom post types
    Force custom post types to use their own capabilities

    Capabilites for attachments are given but the problem remains.

    Thanks in advance

Viewing 15 results - 1 through 15 (of 38 total)