From 3709b0ab8ca245f4e0f754753259ce99c60b05f3 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte Date: Wed, 2 Feb 2022 17:58:09 +0100 Subject: [PATCH 1/2] Removed check DenyGrant in resource permission when adding a denial permission --- pkg/storage/utils/eosfs/eosfs.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pkg/storage/utils/eosfs/eosfs.go b/pkg/storage/utils/eosfs/eosfs.go index 76034da770..bb4e75ba6c 100644 --- a/pkg/storage/utils/eosfs/eosfs.go +++ b/pkg/storage/utils/eosfs/eosfs.go @@ -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) From 91f9761db75cb5903d50d27b8dde2e0453700380 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte Date: Wed, 2 Feb 2022 18:06:56 +0100 Subject: [PATCH 2/2] Add changelog --- changelog/unreleased/eos-fix-deny-grant.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/unreleased/eos-fix-deny-grant.md diff --git a/changelog/unreleased/eos-fix-deny-grant.md b/changelog/unreleased/eos-fix-deny-grant.md new file mode 100644 index 0000000000..1c06336164 --- /dev/null +++ b/changelog/unreleased/eos-fix-deny-grant.md @@ -0,0 +1,4 @@ +Bugfix: Removed check DenyGrant in resource permission +when adding a denial permission + +https://github.com/cs3org/reva/pull/2499 \ No newline at end of file