mirror of
https://github.com/rancher/types.git
synced 2025-09-13 13:33:06 +00:00
Move UserManager to user.Manager and store in contexts
This commit is contained in:
13
user/manager.go
Normal file
13
user/manager.go
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
EnsureUser(principalName, displayName string) (*v3.User, error)
|
||||
CheckAccess(accessMode string, allowedPrincipalIDs []string, user v3.Principal, groups []v3.Principal) (bool, error)
|
||||
}
|
Reference in New Issue
Block a user