Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
mediafile.can_see (#152)
Browse files Browse the repository at this point in the history
managers can see all mediafiles

Fixes #125
  • Loading branch information
ostcar committed Jan 27, 2021
1 parent 2ea4078 commit 22306f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/collection/mediafile.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (m *mediafile) canSeeAction(ctx context.Context, userID int, payload map[st
return false, nil
}

if perms.IsAdmin() {
if perms.Has("mediafile.can_manage") {
return true, nil
}

Expand Down
4 changes: 4 additions & 0 deletions tests/mediafile/can_see_mediafile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ cases:

is_allowed: true

- name: meeting manager
permission: mediafile.can_manage
is_allowed: true

- name: user not in meeting
meeting_id: 2

Expand Down

0 comments on commit 22306f2

Please sign in to comment.