1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 04:40:56 +00:00
Files
types/user/manager.go
Darren Shepherd e9fff3f10f Add EnsureToken
2018-03-03 22:00:07 -07:00

15 lines
543 B
Go

package user
import (
"github.com/rancher/norman/types"
"github.com/rancher/types/apis/management.cattle.io/v3"
)
type Manager interface {
SetPrincipalOnCurrentUser(apiContext *types.APIContext, principal v3.Principal) (*v3.User, error)
GetUser(apiContext *types.APIContext) string
EnsureToken(tokenName, description, userName string) (string, error)
EnsureUser(principalName, displayName string) (*v3.User, error)
CheckAccess(accessMode string, allowedPrincipalIDs []string, user v3.Principal, groups []v3.Principal) (bool, error)
}