forked from External/greenlight
Roles editor bug fix (#721)
* Allow users with just the manage users permission to edit roles * Allow users with just the manage users permission to edit roles * Fix update recordings bug
This commit is contained in:
committed by
Jesus Federico
parent
60f5cd5c81
commit
e1fdc8f58b
@ -260,8 +260,8 @@ class UsersController < ApplicationController
|
||||
|
||||
# Updates as user's roles
|
||||
def update_roles
|
||||
# Check that the user can edit roles
|
||||
if current_user.highest_priority_role.can_edit_roles
|
||||
# Check that the user can manage users
|
||||
if current_user.highest_priority_role.can_manage_users
|
||||
new_roles = params[:user][:role_ids].split(' ').map(&:to_i)
|
||||
old_roles = @user.roles.pluck(:id)
|
||||
|
||||
|
Reference in New Issue
Block a user