Support » Plugin: User Role Editor » [Plugin: User Role Editor] No capabilities for Gravity Forms

  • Resolved Stefan Zwijsen

    (@stef01)


    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    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.

    Thread Starter Stefan Zwijsen

    (@stef01)

    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.

    Plugin Author Vladimir Garagulya

    (@shinephp)

    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…

    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 🙂

    grayayer

    (@grayayer)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: User Role Editor] No capabilities for Gravity Forms’ is closed to new replies.