Skip to content

Commit

Permalink
Removed check DenyGrant in resource permission when adding a denial p…
Browse files Browse the repository at this point in the history
…ermission (cs3org#2499)
  • Loading branch information
gmgigi96 authored and Daniel-WWU-IT committed Feb 16, 2022
1 parent 26e4b57 commit 4c0b810
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 4 additions & 0 deletions changelog/unreleased/eos-fix-deny-grant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bugfix: Removed check DenyGrant in resource permission
when adding a denial permission

https://github.com/cs3org/reva/pull/2499
12 changes: 0 additions & 12 deletions pkg/storage/utils/eosfs/eosfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,18 +601,6 @@ func (fs *eosfs) DenyGrant(ctx context.Context, ref *provider.Reference, g *prov

fn := fs.wrap(ctx, p)

// eos does not offer a permission bit to specify if the
// user can deny or not. We need to take care of that in Reva
// by checking context user has permission to deny
finfo, err := fs.GetMD(ctx, ref, nil)
if err != nil {
return errors.Wrapf(err, "eosfs: error getting metadata for file ref: %+v", ref)
}

if !finfo.PermissionSet.DenyGrant {
return errtypes.PermissionDenied(fmt.Sprintf("eosfs: context user cannot deny access to ref: %+v", ref))
}

position := eosclient.EndPosition

rootAuth, err := fs.getRootAuth(ctx)
Expand Down

0 comments on commit 4c0b810

Please sign in to comment.