package
Version:
v1.19.3
Opens a new window with list of versions in this module.
Published: May 12, 2023
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const AnonymousPrincipalUsername = "anonymous"
type Authorizer struct {
}
Authorizer provides either full (admin) or no access
New Authorizer using the AdminList method
Authorize will give full access (to any resource!) if the user is part of
the admin list or no access at all if they are not
type Config struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Users []string `json:"users" yaml:"users"`
ReadOnlyUsers []string `json:"read_only_users" yaml:"read_only_users"`
}
Config makes every subject on the list an admin, whereas everyone else
has no rights whatsoever
Validate admin list config for viability, can be called from the central
config package
Source Files
¶
Click to show internal directories.
Click to hide internal directories.