forked from External/greenlight
GRN2-xx: Switch the relation between users and roles to make queries cleaner and faster (#1299)
* First steps * Fixes in account creation flow * Fixed most testcases * more test fixes * Fixed more test cases * Passing tests and rubocop * Added rake task to remove rooms
This commit is contained in:
@ -25,7 +25,7 @@ class Ability
|
||||
elsif user.has_role? :super_admin
|
||||
can :manage, :all
|
||||
else
|
||||
highest_role = user.highest_priority_role
|
||||
highest_role = user.role
|
||||
if highest_role.get_permission("can_edit_site_settings")
|
||||
can [:site_settings, :room_configuration, :update_settings,
|
||||
:update_room_configuration, :coloring, :registration_method], :admin
|
||||
|
Reference in New Issue
Block a user