mirror of
https://github.com/hansjone/netx.git
synced 2026-10-12 22:23:28 +08:00
Expose biz-monitor:read on API key scope UI and include it in create defaults.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
e1bae6a14a
commit
04850b942c
3 changed files with 13 additions and 3 deletions
|
|
@ -36,6 +36,7 @@ const ALL_SCOPE_KEYS = [
|
|||
"ne:read",
|
||||
"ne:write",
|
||||
"ne:exec",
|
||||
"biz-monitor:read",
|
||||
"sql:query",
|
||||
"webcrt:session",
|
||||
"admin:users",
|
||||
|
|
@ -43,13 +44,20 @@ const ALL_SCOPE_KEYS = [
|
|||
] as const;
|
||||
|
||||
/** Applied on create; refine later via「改权限」. */
|
||||
const CREATE_DEFAULT_SCOPES = ["alarms:read", "ne:read", "ne:exec", "ne:write"] as const;
|
||||
const CREATE_DEFAULT_SCOPES = [
|
||||
"alarms:read",
|
||||
"ne:read",
|
||||
"ne:exec",
|
||||
"ne:write",
|
||||
"biz-monitor:read",
|
||||
] as const;
|
||||
|
||||
const SCOPE_LABEL_KEYS: Record<(typeof ALL_SCOPE_KEYS)[number], string> = {
|
||||
"alarms:read": "auth.scopeAlarmsRead",
|
||||
"ne:read": "auth.scopeNeRead",
|
||||
"ne:write": "auth.scopeNeWrite",
|
||||
"ne:exec": "auth.scopeNeExec",
|
||||
"biz-monitor:read": "auth.scopeBizMonitorRead",
|
||||
"sql:query": "auth.scopeSql",
|
||||
"webcrt:session": "auth.scopeWebcrt",
|
||||
"admin:users": "auth.scopeAdminUsers",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue