feat(operations): add source diagnosis workspace
This commit is contained in:
@@ -232,6 +232,12 @@ func requiredMenu(r *http.Request) string {
|
||||
}
|
||||
|
||||
func requiredRole(r *http.Request) string {
|
||||
if strings.HasPrefix(r.URL.Path, "/api/v2/operations/") {
|
||||
if r.Method == http.MethodGet || r.Method == http.MethodHead {
|
||||
return "operator"
|
||||
}
|
||||
return "admin"
|
||||
}
|
||||
if (r.Method == http.MethodGet || r.Method == http.MethodHead) && strings.HasPrefix(r.URL.Path, "/api/v2/exports") {
|
||||
return "viewer"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user