forked from External/greenlight
Fixed role permissin check for update_recording and delete_recording (#1308)
Co-authored-by: Jesus Federico <jesus@123it.ca>
This commit is contained in:
parent
311806faa7
commit
37decd9b43
|
@ -57,9 +57,7 @@ class RecordingsController < ApplicationController
|
||||||
|
|
||||||
# Ensure the user is logged into the room they are accessing.
|
# Ensure the user is logged into the room they are accessing.
|
||||||
def verify_room_ownership
|
def verify_room_ownership
|
||||||
if !current_user || (!@room.owned_by?(current_user) &&
|
if !@room.owned_by?(current_user) && !current_user&.highest_priority_role&.get_permission("can_manage_rooms_recordings")
|
||||||
!current_user.highest_priority_role.get_permission("can_edit_site_settings") &&
|
|
||||||
!current_user.has_role?(:super_admin))
|
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue