Documentation ¶
Index ¶
- type GroupPermissions
- func (p *GroupPermissions) GetAuthorizedIndexList(groups []authn.Group, desiredPermission Permission) (indexList []string)
- func (p *GroupPermissions) GetPermissions(user *authn.UserInfo, index string) (permission Permission, errors error)
- func (p *GroupPermissions) IsAdmin(groups []authn.Group) bool
- func (p *GroupPermissions) ReadPermissionsFile(permsFile io.Reader) (err error)
- type Permission
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupPermissions ¶
type GroupPermissions struct { Permissions map[string]map[string]Permission `yaml:"user-groups"` Admin string `yaml:"admin"` }
func (*GroupPermissions) GetAuthorizedIndexList ¶
func (p *GroupPermissions) GetAuthorizedIndexList(groups []authn.Group, desiredPermission Permission) (indexList []string)
func (*GroupPermissions) GetPermissions ¶
func (p *GroupPermissions) GetPermissions(user *authn.UserInfo, index string) (permission Permission, errors error)
func (*GroupPermissions) ReadPermissionsFile ¶
func (p *GroupPermissions) ReadPermissionsFile(permsFile io.Reader) (err error)
type Permission ¶
type Permission string
const ( None Permission = "" Read Permission = "read" Write Permission = "write" Admin Permission = "admin" )
func (Permission) Satisfies ¶
func (p Permission) Satisfies(b Permission) bool
Satisfies returns whether `p` satisfies the permissions required by `b`
Click to show internal directories.
Click to hide internal directories.