Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed check DenyGrant in resource permission when adding a denial permission #2499

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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