Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: kobergj <[email protected]>
  • Loading branch information
2 people authored and rhafer committed Sep 7, 2022
1 parent f684db4 commit fcb7745
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion changelog/unreleased/delete-all-spaces-perm.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Enhancement: Added "delete-all-spaces" permission

We introduced a new permission "delete-all-spaces", user holding this permission are allowed
We introduced a new permission "delete-all-spaces", users holding this permission are allowed
to delete any space of any type.

https://github.com/cs3org/reva/pull/3203
4 changes: 2 additions & 2 deletions pkg/storage/utils/decomposedfs/spaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ func (fs *Decomposedfs) DeleteStorageSpace(ctx context.Context, req *provider.De
}

// - a User with the "delete-all-spaces" permission can delete any space
// - spaces of type personal can also be delete by user with the "delete-all-home-spaces" permission
// - otherwise a space can be deleted by it's manager (i.e. users have the "remove" grant)
// - spaces of type personal can also be deleted by users with the "delete-all-home-spaces" permission
// - otherwise a space can be deleted by its manager (i.e. users have the "remove" grant)
switch {
case fs.canDeleteAllSpaces(ctx):
// We are allowed to delete any space, no further permission checks needed
Expand Down

0 comments on commit fcb7745

Please sign in to comment.