Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAccess ¶
type AdminAccess struct { // Enabled indicates if access is enabled Enabled bool `json:"enabled"` }
AdminAccess describes admin access
type Role ¶
type Role struct { // Name is role name Name string `json:"name"` // Access is a set of attributes describing role permissions Access RoleAccess `json:"access"` // System is a flag indicating if a role is builtin system role System bool `json:"system"` }
Role describes user role consumed by web ui
func NewRole ¶
func NewRole(sRole teleservices.Role) *Role
NewRole creates a new instance of UI Role
func (*Role) ToTeleRole ¶
func (r *Role) ToTeleRole() (teleservices.Role, error)
ToTeleRole converts UI Role to Storage Role
type RoleAccess ¶
type RoleAccess struct { // Admin describes admin access Admin AdminAccess `json:"admin"` // SSH describes SSH access SSH SSHAccess `json:"ssh"` }
RoleAccess describes a set of role permissions
func MergeAccessSet ¶
func MergeAccessSet(accessList []*RoleAccess) *RoleAccess
MergeAccessSet merges a set of roles by strongest permission
func (*RoleAccess) Apply ¶
func (a *RoleAccess) Apply(teleRole teleservices.Role)
Apply applies this role access to Teleport Role
Click to show internal directories.
Click to hide internal directories.