Skip to content

Commit

Permalink
eosgrpc: remove user.acl parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Feb 3, 2022
1 parent dbe2adb commit 3897876
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion pkg/eosclient/eosbinary/eosbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import (
const (
versionPrefix = ".sys.v#."
lwShareAttrKey = "reva.lwshare"
userACLEvalKey = "eval.useracl"
)

const (
Expand Down
16 changes: 0 additions & 16 deletions pkg/eosclient/eosgrpc/eosgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,22 +501,6 @@ func (c *Client) fixupACLs(ctx context.Context, auth eosclient.Authorization, in
}
}

// Read user ACLs if sys.eval.useracl is set
if userACLEval, ok := info.Attrs["sys."+userACLEvalKey]; ok && userACLEval == "1" {
if userACL, ok := info.Attrs["user.acl"]; ok {
userAcls, err := acl.Parse(userACL, acl.ShortTextForm)
if err != nil {
return nil
}
for _, e := range userAcls.Entries {
err = info.SysACL.SetEntry(e.Type, e.Qualifier, e.Permissions)
if err != nil {
return nil
}
}
}
}

// We need to inherit the ACLs for the parent directory as these are not available for files
if !info.IsDir {
parentInfo, err := c.GetFileInfoByPath(ctx, auth, path.Dir(info.File))
Expand Down

0 comments on commit 3897876

Please sign in to comment.