1
0
mirror of https://github.com/rancher/types.git synced 2025-09-01 05:09:10 +00:00
Files
types/user/manager.go

22 lines
1.1 KiB
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
2021-01-04 21:51:08 -07:00
EnsureToken(tokenName, description, kind, userName string, ttl *int64, randomize bool) (string, error)
EnsureClusterToken(clusterName, tokenName, description, kind, userName string, ttl *int64, randomize bool) (string, error)
DeleteToken(tokenName string) error
EnsureUser(principalName, displayName string) (*v3.User, error)
2018-12-03 09:33:52 -07:00
CheckAccess(accessMode string, allowedPrincipalIDs []string, userPrincipalID string, groups []v3.Principal) (bool, error)
2018-03-30 16:12:30 -07:00
SetPrincipalOnCurrentUserByUserID(userID string, principal v3.Principal) (*v3.User, error)
CreateNewUserClusterRoleBinding(userName string, userUID apitypes.UID) error
GetUserByPrincipalID(principalName string) (*v3.User, error)
2020-07-16 13:03:01 -07:00
GetKubeconfigToken(clusterName, tokenName, description, kind, userName string) (*v3.Token, error)
}