WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
[resolved] No capabilities for Gravity Forms (6 posts)

  1. Stefan
    Member
    Posted 3 years ago #

    Hi,

    I use the User Role Editor plugin in combination with the Admin Menu Editor plugin to restrict backend access to certain menus for the clients.

    I installed the Gravity Forms plugin to create form on the site. Now I see that the Gravity Form capabilities, like gform_full_access, don't show up in the User Role Editor capabilities list. So I can't assign the gf capabilities to specific roles.

    The Gravity Forms features say that role management is integrated with the Member plugin.
    I there anything that can be done to have the capabilities available in the User Role Editor?

    Thanks.

  2. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    It was possible with one of previouse URE versions. Do you use a last one? Please check the Administrator role. Do you see new capabilities from GForms in it?

    Try to extract data with this SQL query
    SELECT * FROM wp_options WHERE option_name="wp_user_roles"
    and check if you see GForms capabilities there.

  3. Stefan
    Member
    Posted 3 years ago #

    Yes, I'm using URE v3.0.1.
    There are no GForms capabilities in the result of the query.

    Now, GForms specifies it needs MyQSL 5+, and I'm running the site on 4.1.x. The GForms work just fine, but probably this has something to do with the capabilities problem.
    I will try to test it with MySQL 5 and see if the problem still exists.

  4. Vladimir Garagulya
    Member
    Plugin Author

    Posted 3 years ago #

    No, MySQL version doesn't matter here.
    I looked into Members plugin code. Difference is that Members uses inner WP class to retrieve roles and capabilities from DB or get them from already created object in memory, but URE plugin always works directly with WP MySQL database tables.

    I have one guess:
    If GForms added its capabilities to the WP global roles object (on the fly) every time it is loaded into memory, Members could catch them, URE - can not, as they aren't stored in the MySQL database.

    Members plugin is written more universal way (but URE could be little more effective :) . Finally, I should update URE in the same manner, but don't know when I find time to make such update...

  5. dochara
    Member
    Posted 3 years ago #

    May help. I (accidently) discovered that if you make a user an admin, thus giving them Gravity Form rights, and then return them to the custom role their rights to Gravity forms are maintained. In my case the custom role is 'Siteadmin', which allows must admin functions except plugin, theme and edit file access.

    You could I suppose call this a bug, but in this case it's a useful one for me at least :)

  6. grayayer
    Member
    Posted 2 years ago #

    better yet, avoid using the plug-in for this issue and just write some code directly into the functions.php file for your theme:

    //Giving Editors Access to Gravity Forms
    function add_grav_forms(){
    	$role = get_role('editor');
    	$role->add_cap('gform_full_access');
    }
    add_action('admin_init','add_grav_forms');

    it works for me without having to use the capabilities plug-in at all.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic