Skip to content

Commit

Permalink
eos: do not read user ACLs any longer
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed May 17, 2024
1 parent be2ce5f commit be2905a
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions pkg/eosclient/eosbinary/eosbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ import (
)

const (
versionPrefix = ".sys.v#."
userACLEvalKey = "eval.useracl"
favoritesKey = "http://owncloud.org/ns/favorite"
versionPrefix = ".sys.v#."
favoritesKey = "http://owncloud.org/ns/favorite"
)

func serializeAttribute(a *eosclient.Attribute) string {
Expand Down Expand Up @@ -1211,23 +1210,6 @@ func (c *Client) mapToFileInfo(ctx context.Context, kv, attrs map[string]string,
return nil, err
}

// Temporary until we migrate the user ACLs to sys ACLs on our MGMs
// Read user ACLs if sys.eval.useracl is set
if userACLEval, ok := attrs["sys."+userACLEvalKey]; ok && userACLEval == "1" {
if userACL, ok := attrs["user.acl"]; ok {
userAcls, err := acl.Parse(userACL, acl.ShortTextForm)
if err != nil {
return nil, err
}
for _, e := range userAcls.Entries {
err = sysACL.SetEntry(e.Type, e.Qualifier, e.Permissions)
if err != nil {
return nil, err
}
}
}
}

// Read the favorite attr
if parseFavoriteKey {
parseAndSetFavoriteAttr(ctx, attrs)
Expand Down

0 comments on commit be2905a

Please sign in to comment.