Change WordPress user roles and capabilities › Forums › Bug Reports › Gravity Forms Restrictions No Longer Working
Tagged: gravity forms
- This topic has 13 replies, 5 voices, and was last updated 2 years, 3 months ago by Gracie Vaughn.
-
AuthorPosts
-
23/03/2022 at 19:21 #7864epssParticipant
I have been using user role editor to restrict users to specific gravity forms. It is no longer working and the users have access to ALL OF THE FORMS. This is a MAJOR issue for us because we have information in forms that can not be shared between users on the site.
I’m not sure when it stopped working. When I edit a user there are new options to “What to do – Allow, Prohibit, and Look at Roles” Nothing is selected for existing users. I selected What to do: Allow and then had the same list of form ids that was previously working and the user has access to all of the forms on the system. When I select “prohibit” the site reports “There has been a critical error on this website. Please check your site admin email inbox for instructions.” When I select “Look at roles” I can’t tell what it is doing.
23/03/2022 at 19:30 #7865epssParticipantHere is the error report the WP sends out when I have the “Prohibit” item checked.
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.9.2
Current theme: Beaver Builder Child Theme (version 1.0)
Current plugin: User Role Editor Pro (version 4.62)
PHP version 7.4.28Error Details
=============
An error of type E_ERROR was caused in line 211 of the file /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access-user.php. Error message: Uncaught Error: Call to undefined method URE_GF_Access_User::get_fg_list() in /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access-user.php:211
Stack trace:
#0 /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access.php(92): URE_GF_Access_User::get_allowed_forms()
#1 /wp-content/plugins/user-role-editor-pro/pro/includes/classes/gf-access.php(229): URE_GF_Access->get_allowed_forms()
#2 /wp-includes/class-wp-hook.php(307): URE_GF_Access->prohibited_links_redirect(”)
#3 /wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#4 /wp-includes/plugin.php(474): WP_Hook->do_action(Array)
#5 /wp-admin/admin-header.php(163): do_action(‘admin_head’)
#6 /wp-admin/admin.php(239): require_once(‘/23/03/2022 at 20:44 #7866epssParticipantWhen I roll back to user role editor 4.60.2 it works again.
24/03/2022 at 03:02 #7867VladimirKeymasterThanks for the notification. Error in line 211 is caused by a typo skipped the tests somehow. Valid method name for call here is URE_GF_Access_User::get_gf_list(). Fixed.
Related update was introduced with version 4.61 “New: Gravity Forms Edit Access add-on: It’s possible to set what forms is allowed to edit for the selected role.”. It should use “Allow” value by default for not updated user profiles.
I’m ready to investigate the issue. If it’s possible to get admin access to your site (stage/development copy better) send credentials to support [at-sign] role-editor.com
24/03/2022 at 16:34 #7868epssParticipantI have set you up as a user on a development site. You should have the login information in [email protected]
24/03/2022 at 19:26 #7869City DevParticipantI am having the same experience. I can confirm both the issues noted and the solution of downgrading.
25/03/2022 at 05:19 #7870VladimirKeymasterI confirm the issue. Thank you for the provided information and access/data for testing. I work on the fix.
25/03/2022 at 15:20 #7871VladimirKeymasterI found and fixed the bug. I will include it to the next update.
To @epss: I uploaded to dev copy the updated file
user-role-editor-pro/pro/includes/classes/gf-access-user.php
.The begin of get_roles_data() function was replaced from:
private static function get_roles_data( $user_id, $user_what_to_do ) { $all_forms = array(); $access_data = get_option( URE_GF_Access_Role::ACCESS_DATA_KEY ); if ( !is_array( $access_data ) ) { return $all_forms; } $what_to_do = -1; // Not initialized
to
private static function get_roles_data( $user_id, $user_what_to_do ) { $access_data = get_option( URE_GF_Access_Role::ACCESS_DATA_KEY ); if ( !is_array( $access_data ) ) { $data = array( 'what_to_do'=>1, 'forms_list'=>array() ); return $data; } $all_forms = array(); $what_to_do = -1; // Not initialized
26/03/2022 at 14:45 #7875VladimirKeymasterYou may try a beta version 4.62.1.b1. It’s available after login from the “Download” page.
28/03/2022 at 22:18 #7877epssParticipantThanks. From my limited testing, it appears to have resolved both issues.
29/03/2022 at 01:08 #7878VladimirKeymasterThanks a lot for the help.
24/06/2022 at 10:37 #7979James SmithParticipantI can attest to the problems mentioned as well as the downgrade fix.
magento 2 development services24/06/2022 at 15:37 #7983epssParticipantI am currently on the most recent version of both User Role Editor (4.62.1) and WP (6.0) with no issues. The fix that Vladimir released in March resolved the issue
30/06/2022 at 11:21 #7994Gracie VaughnParticipantif gaining admin access to your website is possible.
magento 2 migration service -
AuthorPosts
- You must be logged in to reply to this topic.