Skip to content

Commit

Permalink
Add missing condition for permission checks on spaces
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <crichter@owncloud.com>
Co-authored-by: Michael Barz <mbarz@owncloud.com>
  • Loading branch information
dragonchaser and micbar committed Jul 29, 2022
1 parent 299db15 commit 0d57822
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ func (fs *Decomposedfs) ListStorageSpaces(ctx context.Context, filter []*provide
func (fs *Decomposedfs) MustCheckNodePermissions(ctx context.Context, requestedUserID string, unrestricted bool) bool {
canListAllSpaces := fs.canListAllSpaces(ctx)
switch {
case canListAllSpaces && unrestricted == false:
return true
case (canListAllSpaces && requestedUserID == userIDAny):
// admins should not see any other spaces when they request their own, without settings filters
return true
Expand Down

0 comments on commit 0d57822

Please sign in to comment.