ui

package
v2.1.0-alpha.5+incompa... Latest Latest
Warning

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

Go to latest
Published: May 10, 2017 License: Apache-2.0 Imports: 3 Imported by: 28

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

type SSHAccess

type SSHAccess struct {
	// Logins is a list of allowed logins
	Logins []string `json:"logins"`
	// MaxSessionTTL is max session TLL
	MaxSessionTTL time.Duration `json:"maxTtl"`
	// NodeLabels
	NodeLabels map[string]string `json:"nodeLabels"`
}

SSHAccess describes shh access

Jump to

Keyboard shortcuts

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