1
0
mirror of https://github.com/rancher/types.git synced 2025-04-28 10:33:18 +00:00
types/user/manager.go

20 lines
948 B
Go
Raw Normal View History

package user
import (
"github.com/rancher/norman/types"
"github.com/rancher/types/apis/management.cattle.io/v3"
apitypes "k8s.io/apimachinery/pkg/types"
)
type Manager interface {
SetPrincipalOnCurrentUser(apiContext *types.APIContext, principal v3.Principal) (*v3.User, error)
GetUser(apiContext *types.APIContext) string
2020-02-20 23:03:51 +00:00
EnsureToken(tokenName, description, kind, userName string, ttl *int64) (string, error)
EnsureClusterToken(clusterName, tokenName, description, kind, userName string, ttl *int64) (string, error)
EnsureUser(principalName, displayName string) (*v3.User, error)
2018-12-03 16:33:52 +00:00
CheckAccess(accessMode string, allowedPrincipalIDs []string, userPrincipalID string, groups []v3.Principal) (bool, error)
2018-03-30 23:12:30 +00:00
SetPrincipalOnCurrentUserByUserID(userID string, principal v3.Principal) (*v3.User, error)
CreateNewUserClusterRoleBinding(userName string, userUID apitypes.UID) error
GetUserByPrincipalID(principalName string) (*v3.User, error)
}