Open ale1981 opened 4 years ago
The validation on the Role and Permission name field is wrong, you can have a Role or Permission with the same name but not the same name and guard, so I believe...
Text::make(__('nova-permission-tool::roles.name'), 'name') ->rules(['required', 'string', 'max:255']) ->creationRules('unique:'.config('permission.table_names.roles')) ->updateRules('unique:'.config('permission.table_names.roles').',name,{{resourceId}}'),
should be ...
Text::make(__('nova-permission-tool::roles.name'), 'name') ->rules(['required', 'string', 'max:255']) ->creationRules('unique:'.config('permission.table_names.roles').',name,,,guard_name,'.$request->guard_name) ->updateRules('unique:'.config('permission.table_names.roles').',name,{{resourceId}},id,guard_name,'.$request->guard_name),
+1 This is a problem when you have two guards and the same permission name.
The validation on the Role and Permission name field is wrong, you can have a Role or Permission with the same name but not the same name and guard, so I believe...
should be ...