Change WordPress user roles and capabilities › Forums › How to or FAQ › Duplicate Post capabilities
- This topic has 9 replies, 2 voices, and was last updated 7 years, 5 months ago by edering.
-
AuthorPosts
-
03/06/2017 at 01:35 #3803ederingParticipant
Hi. I created a Role called Manager. It does not give access to Pages or Posts, but I want the capability for Duplicate WooCommerce Products for this Role. We use this Plugin which does it for all Pages, and Posts including WooCommerce Products. https://wordpress.org/plugins/duplicate-post/ But I do not see any capability to select for Duplicate (or Copy or Clone). How do I do this?
03/06/2017 at 02:10 #3804VladimirKeymasterHi,
Look for ‘copy_posts’ or ‘copy_products’ capability. If it does not exist yet, add it manually. I answer without testing.
03/06/2017 at 11:10 #3806VladimirKeymasterAs test showed, ‘copy_posts’ capability is enough to product duplication too.
03/06/2017 at 12:13 #3807ederingParticipantI had that already checked – https://www.screencast.com/t/grRDYmG7PEJl for that role. But when I login as a User for that Role, Clonedoes not appear for Products (it does as an Admin). See this which shows me hovering over a WooCommerce Product and not seeing Clone – https://www.screencast.com/t/SkmYZ484ME
but when I do it for a Page, Clone is there. https://www.screencast.com/t/ygUcBgCZjk
03/06/2017 at 13:32 #3808VladimirKeymasterIt’s strange, that I have another result.
Compare my test role with yours.
03/06/2017 at 20:27 #3809ederingParticipantI checked and all capabilities you have, I have (plus more). https://www.screencast.com/t/2JQdUl0R Any other ideas?
04/06/2017 at 00:57 #3811VladimirKeymasterIt seems a problem is not related to the capabilities granted to a user.
1) Try to switch temporally to the default 2017 theme;
2) Try to deactivate all plugins except WooCommerce and Duplicate Posts;
3) If 2 items above will not show a source of a problem, try to reproduce it on a test data copy or if its not critical, use live data. Provide me a copy of your site files and database. I will install them at my local development environment and find a reason using PHP debug session.04/06/2017 at 12:02 #3822ederingParticipantHi. I figured it out, but don’t have a solution. Duplicate Post has a Permissions area based on Roles – https://www.screencast.com/t/o4JWEBro – but my custom URE Roles are not appearing, so I cannot select it. I sent Duplicate Post a question on how to add Roles to their Permission list, no word yet.
04/06/2017 at 13:57 #3823VladimirKeymaster“Duplicate Posts” includes roles to the roles list at its “Permissions” page checking this condition:
// role should have at least edit_posts capability if ( !$role->has_cap('edit_posts') ) continue;
So if you wish to see your role there, then add ‘edit_posts’ capability to it. When you turn ON checkbox for a role here, “Duplicate Posts” just adds ‘copy_posts’ capability to it. And DP plugin shows checkbox for a role turned ON if that role has ‘copy_posts’ capability already. That’s it.
With my test example, I do not see my custom ‘Vendor’ role at DP permissions page roles list, but I have access to the duplicate post actions…
I suppose that you have some other condition, which prevents to use DP plugin for your custom role.
04/06/2017 at 14:54 #3824ederingParticipantAh, thanks. I was trying to keep that off so the client would not have access to some Custom Post Types, but this is fine.
-
AuthorPosts
- You must be logged in to reply to this topic.