WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
Adding Capability for a specific plugin (28 posts)

  1. Maxal
    Member
    Posted 11 months ago #

    Hi

    First of all, great plugin.

    I have a problem of adding a capability to the role of Editor for having access to a certain plugin. I am using the plugin called Cool Video Gallery. I want my users with Editor role to have permission to use this plugin. Is there any way to make it happen?

    Thanx
    Max

    http://wordpress.org/plugins/user-role-editor/

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Max,

    This plugin uses 'manage_options' capability for all its menu items. Giving access to this capability you give access to all "Settings" menu also.

    Regards,
    Vladimir.

  3. Maxal
    Member
    Posted 11 months ago #

    Hi Vladimir

    Thanx for the reply. I forgot to mention that this plugin does not sit inside the Setting menu of WP. You can see a screenshot here:

    http://imgmad.com/upload/small/2013/09/22/523f426f84c3b.gif

    I hope there is some way to make this plugin available to Editors.

  4. Vladimir Garagulya
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Max,

    this plugin does not sit inside the Setting menu of WP

    I know. But it uses the same capability. You have two way to achieve your goal. Edit plugin code directly, look at line #300 of cool-video-gallery.php:

    add_menu_page('Video Gallery Overview', __('Video Gallery'), 'manage_options', $parent_slug , array( $this, 'gallery_overview'), $this->plugin_url .'/images/video_small.png');
    
    			add_submenu_page( $parent_slug, __('Video Gallery Overview'), 'Overview', 'manage_options', 'cvg-gallery-overview',array($this, 'gallery_overview'));
    			add_submenu_page( $parent_slug, __('Add Gallery / Upload Videos'), 'Add Gallery / Videos', 'manage_options', 'cvg-gallery-add',array($this, 'gallery_add'));
    			add_submenu_page( $parent_slug, __('Manage Video Gallery'), 'Manage Gallery', 'manage_options', 'cvg-gallery-manage',array($this, 'gallery_manage'));
    			add_submenu_page( $parent_slug, __('Gallery Settings'), 'Gallery Settings', 'manage_options', 'cvg-gallery-settings',array($this, 'gallery_settings'));
    			add_submenu_page( $parent_slug, __('Video Player Settings'), 'Video Player Settings', 'manage_options', 'cvg-player-settings',array($this, 'player_settings'));
    			add_submenu_page( $parent_slug, __('CVG Google XML Video Sitemap'), 'Google XML Video Sitemap', 'manage_options', 'cvg-video-sitemap',array($this, 'video_sitemap'));
    			add_submenu_page( $parent_slug, __('CVG Uninstall'), 'Uninstall CVG', 'manage_options', 'cvg-plugin-uninstall',array($this, 'uninstall_plugin'));
    			add_submenu_page( $parent_slug, __('About the Author'), 'About Author', 'manage_options', 'cvg-plugin-about',array($this, 'about_plugin_author'));

    or use additional plugin - Admin Menu Editor, which allows replace capability for existing menu items on the fly.

    Regards,
    Vladimir.

  5. Maxal
    Member
    Posted 11 months ago #

    Hi again Vladimir

    Thank for your time again. The Admin Menu Editor which you suggested needs to be a Pro version to do what I want. For the time being if I want to go for the first option, which is editing plugin in code of the video gallery, could you please tell me what I need to do at line#300 to make it available for Editor role?

    Thanx
    Max

  6. Vladimir Garagulya
    Member
    Plugin Author

    Posted 11 months ago #

    At code fragment quoted above (all lines) you may replace 'manage_options' string to the string with some other capability name you may add with "User Role Editor" and include to the "Editor" role, like 'manage_video_gallery'. That is you should have:

    add_menu_page('Video Gallery Overview', __('Video Gallery'), 'manage_video_gallery', $parent_slug , array( $this, 'gallery_overview'), $this->plugin_url .'/images/video_small.png');
    
    	add_submenu_page( $parent_slug, __('Video Gallery Overview'), 'Overview', 'manage_video_gallery', 'cvg-gallery-overview',array($this, 'gallery_overview'));

    etc.

    Be aware that after each Video Gallery plugin update you should repeat this modification.

    Regards,
    Vladimir.

  7. Maxal
    Member
    Posted 11 months ago #

    Hi Vladimir

    Thank you very much, it's working perfectly. You have been such a huge help. Thanks a lot man :)

    Thanx
    Max

  8. ZDltd
    Member
    Posted 11 months ago #

    Hi Vladimir

    Great plugin but I am also having a similar problem to Maxal above.

    I want to allow this plugin (that is not in the options menu) available in the editor option to allow the client to access this. See plugin i want to allow client to access here> http://wordpress.org/plugins/wp-filemanager/screenshots/

    screencast.com/t/21yEkccIG

    Please can you give me a code or some other solution to this asap.

    PS: I have tried the Admin Menu Editor plugin but this does not work.

    Many Thanks :)

  9. ZDltd
    Member
    Posted 11 months ago #

    Hi Vladimir

    Great plugin but I am also having a similar problem to Maxal above.

    I want to allow this plugin (that is not in the options menu) available in the editor option to allow the client to access this. See plugin i want to allow client to access here> http://wordpress.org/plugins/wp-filemanager/screenshots/

    screencast.com/t/21yEkccIG

    Please can you give me a code or some other solution to this asap.

    PS: I have tried the Admin Menu Editor plugin but this does not work.

    Many Thanks :)

  10. Vladimir Garagulya
    Member
    Plugin Author

    Posted 11 months ago #

    Hi,

    At file wp-filemanager.php, line #53, you may find this code:

    function fm_post_add_options() {
    	add_menu_page('FileManager', 'FileManager', 8, 'wp-filemanager/fm.php');
    	add_submenu_page('wp-filemanager/fm.php','FileManager','Configuration',8,'wpfileman', 'wpfileman_options_admin');

    Add with user role editor new capability 'file_manager', turn it on for the "Editor" role. Then replace 8 at function 'fm_post_add_options' above with 'file_manager'. That's it.

    Please, be aware that if person has direct access to the files of your site, this person may easily get full (not 'Editor' only) access to your site.

    Regards,
    Vladimir.

  11. lognic
    Member
    Posted 10 months ago #

    Hello Vladimir

    First of all, great plugin.

    I have a problem of adding a capability to the role of author for having access to a certain plugin.

    i was wondering if you can point me towards the right direction :

    I want to allow a plugin WP-courseware (that is not in the options menu) available in the author option to allow the client to access this.

    But here is the main concern : how can i prevent authors from seen and editing other authors .
    I want to ALLOW USER TO SEE > ONLY IT'S OWN CONTENT ?

    here is an image of the plugin : http://scorenit.com/media/images/add%20capavility%20to%20autor%20role%20or%20any%20other%20.png

    I hope there is some way to make this work .

    is there a specific file i need to modify or add a code?

    thanks :)

  12. Max Tepermeister
    Member
    Posted 10 months ago #

    I think that is user level. A number from 1-10, that determines what other users they can edit.

    Users can edit people with lower numbers, but not with higher numbers.

    Here

  13. lognic
    Member
    Posted 10 months ago #

    thanks max
    the thing is that I will have multiple users with author role, User roles plugin allows them to work with the plugin, but they all can see and share the work ..

    I just want for each author to see their own content ... what have they created. NOT SHARE THE WORK OR COPY IT .

    UNLESS IS THE ADMINISTRATOR

    any ideas ?

  14. pkmurphy1992
    Member
    Posted 10 months ago #

    Hi Vladimir Garagulya

    I've got the same problem as Maxal had and I've tried what you suggested with the code that you mentioned to add to line 300 in cool-video-gallery.php and all I've got back is PHP code errors.

    Any idea?

  15. esmi
    Forum Moderator
    Posted 10 months ago #

    As per the Forum Welcome, please post your own topic.

  16. Max Tepermeister
    Member
    Posted 10 months ago #

    lognic, I think user levels will do that. User levels of 1 can see:

    Dashboard
    Write
    - Write Post - create Draft Posts only
    Manage
    - Posts - Can edit and delete only their own Drafts and view other posts.
    - Categories - View only
    - Comments - View only including commentor's IP addresses
    -- Awaiting Moderation - Can only see the number of comments awaiting moderation. Cannot moderate.
    Users
    - Your Profile

    User levels of 2 can:

    User Level 2
    Dashboard
    Write
    - Write Post
    Manage
    - Categories - View only
    - Comments - View only including commentor's IP addresses
    -- Awaiting Moderation - Can only see the number of comments awaiting moderation.
    Users
    - Your Profile

    I think level 2 is what you need

  17. Max Tepermeister
    Member
    Posted 10 months ago #

    There is also a permission called: Edit others posts, and Edit others pages. check to make sure they don't have that permission

  18. holiveirapt
    Member
    Posted 3 months ago #

    Hi,

    I would like to give permissions in the User Role Editor to acess Document Links Widget.
    How can I do it?

    Thank you

  19. ppotts
    Member
    Posted 1 month ago #

    I would like to give permissions to edit the Revolution Slider. Can you help with that permission? Thank you.

  20. Vladimir Garagulya
    Member
    Plugin Author

    Posted 1 month ago #

    Revolution Slider uses 'manage_options' capability - the same as WordPress uses for the "Settings" menu.

  21. lologoo
    Member
    Posted 1 month ago #

    hi,
    i add plug in for brand , the site i run is multi vendors ,
    how i limit the vendors to edit/delete this brand plugin ?

  22. Nathora
    Member
    Posted 3 weeks ago #

    I have a problem like this problem but my plugin is Video Manager. I want my users with Editor role to have permission . please ..?
    Thank.

  23. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 weeks ago #

    Hi,

    To @lologoo: if question is still actual, send the download link to the brand plugin do you use.

    @Nathora: the same question - I need the download link to the Video Manager plugin in order to help you.

  24. kobireed
    Member
    Posted 3 weeks ago #

    Hello. Loving your plugin so far.

    I have given admin rights to a particular user. I have allowed the "manage_options" capability.

    But I want him to only be able to see 1 of the 4 plugin's visable on the site. Is it possible to limit which specific plugin he sees (it is the Revolution Slider...I want him to be able to go in and add slides, etc in that plugin...but only that one plugin)?

    Any assistance on this would be greatly appreciated.

    Thank you for your help.

  25. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 weeks ago #

    @kobireed
    Hello,
    Thanks for good words.
    Pro version of User Role Editor may help you. Read this post
    https://www.role-editor.com/block-admin-menu-items

  26. kobireed
    Member
    Posted 3 weeks ago #

    If you upgrade to Pro version and don't renew at the end of Subscription, do you loose functionality options one may have activated when purchasing the Pro?

  27. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 weeks ago #

    Pro version includes free version as the core, but should be installed separately. It stays full functional after the end of subscription period. You lose the access to the updates and support only. Plugin will work until its old version is compatible with the new versions of WordPress.

  28. ishjindal
    Member
    Posted 2 weeks ago #

    I am using mtouch quiz plugin (https://wordpress.org/plugins/mtouch-quiz/) and want to give contributor the capability to add quizzes. I have tried checking manage_options and also added other capabilities but still it doesn't come. Could you please suggest what needs to be done?

Reply

You must log in to post.

About this Plugin

About this Topic