github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/pkg/auth/acl/name.go (about)

     1  package acl
     2  
     3  import "strings"
     4  
     5  const PolicyPrefix = "ACL(_-_)"
     6  
     7  // PolicyName returns the policy identifier for the ACL for groupID.
     8  func PolicyName(groupID string) string {
     9  	return PolicyPrefix + groupID
    10  }
    11  
    12  func IsPolicyName(policyName string) bool {
    13  	return strings.HasPrefix(policyName, PolicyPrefix)
    14  }