Skip to content

Commit

Permalink
fix: Handle orphan video stream access
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal committed Nov 15, 2020
1 parent e0ca6e8 commit 4131c86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/models/video_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def event(self):

@property
def user_can_access(self):
event_id = self.rooms[0].event_id
rooms = self.rooms
if not rooms:
return False
event_id = rooms[0].event_id
user = current_user
if user.is_staff or has_access('is_coorganizer', event_id=event_id):
return True
Expand Down

0 comments on commit 4131c86

Please sign in to comment.