acl

package
v0.101.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ACLRead allows reading the specified repositories, as well as
	// managing own credentials.
	ACLRead model.ACLPermission = "Read"
	// ACLWrite allows reading and writing the specified repositories,
	// as well as managing own credentials.
	ACLWrite model.ACLPermission = "Write"
	// ACLSuper allows reading, writing, and all other actions on the
	// specified repositories, as well as managing own credentials.
	ACLSuper model.ACLPermission = "Super"
	// ACLAdmin allows all operations, including all reading, writing,
	// and all other actions on all repositories, and managing
	// authorization and credentials of all users.
	ACLAdmin model.ACLPermission = "Admin"
)
View Source
const (
	ACLAdminsGroup  = "Admins"
	ACLSupersGroup  = "Supers"
	ACLWritersGroup = "Writers"
	ACLReadersGroup = "Readers"
)
View Source
const ACLPolicyPrefix = "ACL(_-_)"

Variables

View Source
var (
	ACLPermissions = []model.ACLPermission{ACLRead, ACLWrite, ACLSuper, ACLAdmin}

	ErrBadACLPermission = fmt.Errorf("%w: Bad ACL permission", model.ErrValidationError)
)

Functions

func ACLPolicyName

func ACLPolicyName(groupID string) string

ACLPolicyName returns the policy identifier for the ACL for groupID.

func ACLToStatement

func ACLToStatement(acl model.ACL) (model.Statements, error)

func IsACLPolicyName

func IsACLPolicyName(policyName string) bool

func WriteGroupACL

func WriteGroupACL(ctx context.Context, svc auth.Service, groupName string, acl model.ACL, creationTime time.Time, warnIfCreate bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL