Skip to content

Commit

Permalink
Merge pull request #4464 from aduffeck/dont-check-locks-grants
Browse files Browse the repository at this point in the history
Dont check locks grants
  • Loading branch information
dragonchaser committed Jan 22, 2024
2 parents 9641661 + d9cf730 commit d79f163
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/allow-changing-grants-when-locked.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Do not lose revisions when restoring the first revision

We no longer prevent modifying grants on locked resources.

https://github.com/cs3org/reva/pull/4464
10 changes: 0 additions & 10 deletions pkg/storage/utils/decomposedfs/grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ func (fs *Decomposedfs) RemoveGrant(ctx context.Context, ref *provider.Reference
}
}

// check lock
if err := grantNode.CheckLock(ctx); err != nil {
return err
}

if err := grantNode.DeleteGrant(ctx, g, false); err != nil {
return err
}
Expand Down Expand Up @@ -308,11 +303,6 @@ func (fs *Decomposedfs) loadGrant(ctx context.Context, ref *provider.Reference,
}

func (fs *Decomposedfs) storeGrant(ctx context.Context, n *node.Node, g *provider.Grant) error {
// check lock
if err := n.CheckLock(ctx); err != nil {
return err
}

var spaceType string
spaceGrant := ctx.Value(utils.SpaceGrant)
// this is not a grant on a space root we are just adding a share
Expand Down

0 comments on commit d79f163

Please sign in to comment.