From 3ca37ee11f68f1d902e7512b493e0f3d36eb28f6 Mon Sep 17 00:00:00 2001 From: Gianmaria Del Monte <39946305+gmgigi96@users.noreply.github.com> Date: Tue, 15 Feb 2022 15:40:17 +0100 Subject: [PATCH] Removed check DenyGrant in resource permission when adding a denial permission (#2499) --- changelog/unreleased/eos-fix-deny-grant.md | 4 ++++ pkg/storage/utils/eosfs/eosfs.go | 12 ------------ 2 files changed, 4 insertions(+), 12 deletions(-) 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 diff --git a/pkg/storage/utils/eosfs/eosfs.go b/pkg/storage/utils/eosfs/eosfs.go index f4c9b66e91..59b0fa8b88 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)