Change WordPress user roles and capabilities › Forums › Search › Search Results for 'Force custom post types to use their own capabilities'
-
AuthorSearch Results
-
07/06/2017 at 05:52 #3835
In reply to: Can't revoke access custom post types
VladimirKeymasterHi,
URE shows (0/0) for a custom post type (CPT) if it users WordPress built-in ‘post’ based capabilities set, like ‘edit_posts’, ‘edit_published_posts’, etc.
You have two alternative options to block CPT menu for the role:
1) use admin menu access add-on for it.2) activate “Force custom post types to use their own capabilities” option at the Settings->User Role Editor->Additional Modules tab. It will require to modify existing roles to provide access to the custom post type. Conflicts with some plugins are possible.
22/05/2017 at 08:17 #3772In reply to: Can't change settings of other plugin as admin
fuseoParticipantThank you. I’ve written a review.
One more question though: I’m creating a new user role called ‘Equilli Brugge’. This person should have access to 3 specific pages, a custom post type (called ‘nieuws’) and the Booked plugin appointments.
Here’s the problem:
When I activate “Force custom post types to use their own capabilities”, this user has access to the ‘nieuws’ custom post type, but can’t access the Booked plugin. When I disable “Force custom post types to use their own capabilities”, the user has access to the Booked plugin, but not the ‘nieuws’ posts.
What should I do to fix this?
18/05/2017 at 14:18 #3743bcspcaParticipantSorry. I just discovered that this is resolved when I enable “Force custom post types to use their own capabilities”.
https://www.role-editor.com/forums/search/Force+custom+post+types+to+use+their+own+capabilities/
08/05/2017 at 15:20 #3686In reply to: Custom Post Types – no available options
VladimirKeymasterThis shows that you don’t have custom post types which use user capabilities different from defined by WordPress for posts: edit_posts, etc.
If you wish to force all existing custom post types to use their own user capabilities, like ‘edit_videos’ for ‘videos’ custom post type, etc., then go to “Settings->User Role Editor->Additional Modules” and turn ON the “Force custom post types to use their own capabilities” checkbox.
Pay attention then Media Library items will require ‘edit_attachments’, instead of ‘edit_posts’ after that.
27/08/2016 at 00:53 #2666In reply to: Restrict Custom Post Type 'Testimonials'
VladimirKeymasterOften custom post types are protected with the same capabilities set as the built-in posts: edit_posts, edit_others_posts, etc.
In order to check what capabilities are in use for the custom post type you may use “Admin menu access” add-on.
Activate it and open for ‘Administrator’ role. Found ‘Testimonials’ at the list of menu items opened. Look what it’s shown at the ‘User capability’ column.Other way to check selected post type capabilities is to add this code to the functions.php and look at its output at the admin page HTML source:
add_action('admin_head', 'debug_output'); function debug_output() { $post_type = get_post_type_object('post'); // replace post with custom post type ID if needed echo '<!--start debug---' . PHP_EOL; print_r($post_type->cap); echo '---stop debug-->' . PHP_EOL; }
If it uses its own capability, like ‘edit_testimonials’, just grant/revoke them with URE.
If it uses ‘edit_posts’, etc. you have 2 options:
1) block access to other post types blocking access to their menu items via “Admin menu access” module.
2) Activate “Force custom post types to use their own capabilities” option at the “Settings->User Role Editor->Additional Modules” tab. Any custom post type (including reserved one, like ‘attachment’ will use its own capabilities set.11/08/2016 at 18:29 #2622heatherParticipantOkay, so I went to Settings > User Role Editor > ‘Force custom post types to use their own capabilities’ and was able to refine the role’s access to certain items.
This worked very well.
10/06/2016 at 15:50 #2408In reply to: WordPress Team Manager
VladimirKeymasterYou are right. My apologies – I had ‘Force custom post types to use their own capabilities’ option turned ON at my test site User Role Editor Settings page. So I had a different picture and misleaded you, slightly I hope.
By default, ‘WordPress Team Manager’ uses the same capabilities for its CPT ‘team_manager’ as WordPress does for the posts.
Let’s start from the very begin. Do you as admin see at the ‘Team’ menu some list of the members with different groups? User with ‘editor’ role should see them all also.
For example:
If you activated ‘Activate user access management to editing selected posts, pages, custom post types’ option at URE’s Settings, you should see the ‘Posts Edit’ button at the User Role Editor. If you open it for the ‘Editor’ role and input some groups ID (comma separated) there, you will see as the Editor just members from those groups.19/04/2016 at 12:54 #2260SilverwoodMediaParticipantThe administrator has all permissions. I have set Force custom post types to use their own capabilities
/wp-admin/edit.php?post_type=et_pb_layout
Cheating, are we?
You are not allowed to edit posts in this post type.et_pb_layout is not an option in UREPro.
Switching force cpt off remedies the problem.
-
AuthorSearch Results