mirror of
https://github.com/rancher/steve.git
synced 2025-09-06 18:01:04 +00:00
Add dashboard to steve
This commit is contained in:
@@ -146,6 +146,17 @@ func ToMiddleware(auth Authenticator) Middleware {
|
||||
}
|
||||
}
|
||||
|
||||
func AlwaysAdmin(req *http.Request) (user.Info, bool, error) {
|
||||
return &user.DefaultInfo{
|
||||
Name: "admin",
|
||||
UID: "admin",
|
||||
Groups: []string{
|
||||
"system:masters",
|
||||
"system:authenticated",
|
||||
},
|
||||
}, true, nil
|
||||
}
|
||||
|
||||
func Impersonation(req *http.Request) (user.Info, bool, error) {
|
||||
userName := req.Header.Get(transport.ImpersonateUserHeader)
|
||||
if userName == "" {
|
||||
|
Reference in New Issue
Block a user