Versions in this module Expand all Collapse all v1 v1.6.1 Jul 9, 2019 Changes in this version + const PolicyNodeMetaExtension + const PolicyNodeMetaMTime + const PolicyNodeMetaMimeType + const PolicyNodeMetaName + const PolicyNodeMetaPath + const PolicyNodeMetaSize + const PolicyNodeMeta_ + var AclContentLock = &idm.ACLAction + var AclDelete = &idm.ACLAction + var AclDeny = &idm.ACLAction + var AclFrontAction_ = &idm.ACLAction + var AclFrontParam_ = &idm.ACLAction + var AclList = &idm.ACLAction + var AclLock = &idm.ACLAction + var AclPolicy = &idm.ACLAction + var AclQuota = &idm.ACLAction + var AclRead = &idm.ACLAction + var AclRecycleRoot = &idm.ACLAction + var AclWrite = &idm.ACLAction + var AclWsrootActionName = "workspace-path" + var FlagsToNames = map[BitmaskFlag]string + var NamesToFlags = map[string]BitmaskFlag + var ResolvePolicyRequest PolicyResolver + func AccessListLoadFrontValues(ctx context.Context, accessList *AccessList) error + func CheckContentLock(ctx context.Context, node *tree.Node) error + func FindUserNameInContext(ctx context.Context) (string, claim.Claims) + func GetACLsForRoles(ctx context.Context, roles []*idm.Role, actions ...*idm.ACLAction) []*idm.ACL + func GetACLsForWorkspace(ctx context.Context, workspaceIds []string, actions ...*idm.ACLAction) (acls []*idm.ACL, err error) + func GetRoles(ctx context.Context, names []string) []*idm.Role + func GetRolesForUser(ctx context.Context, user *idm.User, createMissing bool) []*idm.Role + func GetWorkspacesForACLs(ctx context.Context, list *AccessList) []*idm.Workspace + func IsUserLocked(user *idm.User) bool + func PolicyContextFromMetadata(policyContext map[string]string, ctx context.Context) + func PolicyContextFromNode(policyContext map[string]string, node *tree.Node) + func PolicyRequestSubjectsFromClaims(claims claim.Claims) []string + func PolicyRequestSubjectsFromUser(user *idm.User) []string + func RunJavaScript(ctx context.Context, script string, inputs map[string]interface{}, ...) error + func SearchUniqueUser(ctx context.Context, login string, uuid string, ...) (user *idm.User, err error) + type AccessList struct + Acls []*idm.ACL + FrontPluginsValues []*idm.ACL + NodesAcls map[string]Bitmask + OrderedRoles []*idm.Role + Workspaces map[string]*idm.Workspace + WorkspacesNodes map[string]map[string]Bitmask + func AccessListFromContextClaims(ctx context.Context) (accessList *AccessList, err error) + func AccessListFromRoles(ctx context.Context, roles []*idm.Role, countPolicies bool, ...) (accessList *AccessList, err error) + func AccessListFromUser(ctx context.Context, userNameOrUuid string, isUuid bool) (accessList *AccessList, user *idm.User, err error) + func NewAccessList(orderedRoles []*idm.Role, Acls ...[]*idm.ACL) *AccessList + func (a *AccessList) Append(acls []*idm.ACL) + func (a *AccessList) BelongsToWorkspaces(ctx context.Context, nodes ...*tree.Node) (workspaces []*idm.Workspace, workspacesRoots map[string]string) + func (a *AccessList) CanRead(ctx context.Context, nodes ...*tree.Node) bool + func (a *AccessList) CanWrite(ctx context.Context, nodes ...*tree.Node) bool + func (a *AccessList) FirstMaskForParents(ctx context.Context, nodes ...*tree.Node) (Bitmask, *tree.Node) + func (a *AccessList) Flatten(ctx context.Context) + func (a *AccessList) GetAccessibleWorkspaces(ctx context.Context) map[string]string + func (a *AccessList) GetNodesBitmasks() map[string]Bitmask + func (a *AccessList) GetWorkspacesNodes() map[string]map[string]Bitmask + func (a *AccessList) HasPolicyBasedAcls() bool + func (a *AccessList) IsLocked(ctx context.Context, nodes ...*tree.Node) bool + func (a *AccessList) ParentMaskOrDeny(ctx context.Context, nodes ...*tree.Node) (bool, Bitmask) + func (a *AccessList) Zap() zapcore.Field + type Bitmask struct + PolicyIds map[string]string + ValueFlags map[BitmaskFlag]string + func (f *Bitmask) AddFlag(flag BitmaskFlag) + func (f *Bitmask) AddPolicyFlag(policyId string) + func (f *Bitmask) AddValueFlag(flag BitmaskFlag, value string) + func (f Bitmask) HasFlag(ctx context.Context, flag BitmaskFlag, ctxNode ...*tree.Node) bool + type BitmaskFlag uint32 + const FlagDelete + const FlagDeny + const FlagList + const FlagLock + const FlagPolicy + const FlagQuota + const FlagRead + const FlagWrite + type JsRequest struct + UserAgent string + UserIP string + type JsUser struct + GroupPath string + GroupPathFlattened string + Name string + type PolicyResolver func(ctx context.Context, request *idm.PolicyEngineRequest) (*idm.PolicyEngineResponse, error) + type Right struct + Read bool + Write bool + func (r *Right) IsAccessible() bool + func (r *Right) String() string Incompatible versions in this module v2.0.6+incompatible Apr 23, 2020