23/10/2016 at 10:15 #2895
I have a custom post type called “Inventory” and a user role called “Dealer”. I am trying to lock down wp-admin users of the Dealer role to only be able to edit their Inventory posts and to not be able to even see other post types or WordPress setting (plugins, themes, users..everything that is not Inventory CPT related).
The Dealer role has the following capabilities
Unless I give the Dealer role access to General/manage_options , which gives access to way too many WordPress setup admin items, then a Dealer user sees a blank white screen when they go to /wp-admin/edit.php?post_type=inventory screen (no WP errors, no php errors) IF they do not have any posts.23/10/2016 at 16:47 #2896
Could you temporarily set via wp-config.php the debug output for WordPress and let me know the error message?
May be you can look at the server PHP or Apache system logs to get more information about the reason of this problem.23/10/2016 at 21:38 #2897
WP Debug Enabled
Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( ‘custom-background’, $args ) instead. in /public_html/wp-includes/functions.php on line 3573
Notice: add_custom_image_header is deprecated since version 3.4! Use add_theme_support( ‘custom-header’, $args ) instead. in /public_html/wp-includes/functions.php on line 3573
Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use
instead. in /public_html/wp-includes/functions.php on line 362423/10/2016 at 21:44 #2898
Apache/Php error log is merely reiterating what the WP Debug reported.24/10/2016 at 00:46 #2899
Temporal workaround: You may give ‘manage_options’ to the role for this user and use “Admin menu access” add-on to block extra menu items which will become available to the user after that.
Investigate a problem at the dev. copy. Try to deactivate all plugins (may be except one which creates a CPT inventory if you use some). Will it change situation?26/10/2016 at 02:51 #2905
The workaround appears to be working, thank you.
I do not have a separate dev environment to be testing that significant of changes at the moment. Also I setup the CPT in the functions.php file, I did not use a plugin to create it.
Aside from this issue, it appears I can give this restricted user access to “upload_file”. This gives them access to view files in the Media Gallery they did not upload. Can that be restricted so they can only see photos they uploaded?
Thank you Vladimir!26/10/2016 at 03:04 #2906
If user should edit just his own data remove ‘edit_others_inventorys’, ‘delete_others_inventorys’.
To hide from the listings the items created by other authors open ‘Posts Edit’ for the role and turn ON the “Own data only” checkbox.26/10/2016 at 03:57 #2907
I should have mentioned I did change the role’s Inventory permissions to only “edit_inventorys” and ” read_private_inventorys” . The only Post option the role has is “read_private_posts”.
I am not seeing “Post Edits” or “Own Data Only”….is there a particular Modules I need enabled for that? Right now I just have the following modules enabled:
– Activate Administrator Menu Access module
– Activate Other Roles Access module26/10/2016 at 06:23 #2908
Right, you need to activate the “Posts edit access restrictions” add-on.
I thought you activated it after reading this “…only be able to edit their Inventory posts…”.31/10/2016 at 21:25 #2924
That worked. Thank you very much Vladimir!
- You must be logged in to reply to this topic.