2018-03-02 18:49:51 +00:00
|
|
|
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
|
2018-03-04 04:59:27 +00:00
|
|
|
EnsureToken(tokenName, description, userName string) (string, error)
|
2018-03-02 18:49:51 +00:00
|
|
|
EnsureUser(principalName, displayName string) (*v3.User, error)
|
|
|
|
CheckAccess(accessMode string, allowedPrincipalIDs []string, user v3.Principal, groups []v3.Principal) (bool, error)
|
|
|
|
}
|