mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 15:18:01 +08:00
Big refactoring for context.User, and how current user info is fetching, now included collaborator role
This commit is contained in:
@ -13,8 +13,8 @@ import (
|
||||
)
|
||||
|
||||
type AuthOptions struct {
|
||||
ReqAdmin bool
|
||||
ReqSignedIn bool
|
||||
ReqGrafanaAdmin bool
|
||||
ReqSignedIn bool
|
||||
}
|
||||
|
||||
func getRequestAccountId(c *Context) (int64, error) {
|
||||
@ -68,7 +68,7 @@ func Auth(options *AuthOptions) macaron.Handler {
|
||||
return
|
||||
}
|
||||
|
||||
if !c.IsAdmin && options.ReqAdmin {
|
||||
if !c.IsGrafanaAdmin && options.ReqGrafanaAdmin {
|
||||
authDenied(c)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user