GRN2-128: Added the ability to manage rooms (#848)

* Added the ability to manage rooms

* Small fixes

* Fixed travis complaints

* Fixed issues with role permissions

* Fixed issue with delete room

* Fixed rubocop and added testcases
This commit is contained in:
Ahmad Farhat
2020-01-09 11:05:17 -05:00
committed by farhatahmad
parent 984e5cc085
commit 09de6b6739
20 changed files with 394 additions and 35 deletions

View File

@ -27,7 +27,7 @@ class Ability
else
highest_role = user.highest_priority_role
if highest_role.get_permission("can_edit_site_settings")
can [:index, :site_settings, :server_recordings, :update_settings, :coloring, :registration_method], :admin
can [:index, :site_settings, :update_settings, :coloring, :registration_method], :admin
end
if highest_role.get_permission("can_edit_roles")
@ -39,8 +39,12 @@ class Ability
:approve, :invite, :reset, :undelete], :admin
end
if highest_role.get_permission("can_manage_rooms_recordings")
can [:index, :server_recordings, :server_rooms], :admin
end
if !highest_role.get_permission("can_edit_site_settings") && !highest_role.get_permission("can_edit_roles") &&
!highest_role.get_permission("can_manage_users")
!highest_role.get_permission("can_manage_users") && !highest_role.get_permission("can_manage_rooms_recordings")
cannot :manage, AdminsController
end
end