-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.json
More file actions
157 lines (157 loc) · 4.13 KB
/
admin.json
File metadata and controls
157 lines (157 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
{
"name": "Admin",
"access": {
"anon": "Cannot access the admin backend.",
"user": "Cannot access the admin backend.",
"admin": "Can access governance pages for moderation, users, OAuth, bus, and more.",
"agent": "No admin tools are currently provided."
},
"rules": {
"divided-by-responsibility": "The admin backend is divided by governance responsibility, not all actions on one page.",
"moderation-centralized": "Comment and description governance are currently centralized on the moderation page.",
"high-risk-feedback": "High-risk admin actions such as delete, suspend, and hide must have clear feedback."
},
"capabilities": {
"admin-home": {
"title": "Admin Home",
"auth": "admin",
"web": {
"pages": ["/admin"]
},
"display": {
"fields": [
"Navigation to moderation queues",
"User management",
"OAuth client management",
"Bus data management"
]
}
},
"moderation": {
"title": "Moderation",
"auth": "admin",
"web": {
"pages": ["/admin/moderation"]
},
"rest": {
"routes": [
{
"path": "/api/admin/comments",
"returns": "{ comments: Comment[] }"
},
{
"path": "/api/admin/comments/[id]",
"method": "PATCH",
"returns": "{ comment: Comment }"
},
{
"path": "/api/admin/descriptions",
"returns": "{ descriptions: Description[] }"
},
{
"path": "/api/admin/suspensions",
"returns": "{ suspensions: Suspension[] }"
},
{
"path": "/api/admin/suspensions/[id]",
"method": "PATCH",
"returns": "{ suspension: Suspension }"
},
{
"path": "/api/admin/homeworks",
"returns": "{ homeworks: HomeworkItem[] }"
},
{
"path": "/api/admin/homeworks/[id]",
"method": "DELETE",
"returns": "{ success: Boolean }"
}
]
},
"mcp": "unavailable",
"display": {
"fields": [
"Comment moderation table",
"Description moderation table",
"content/descriptionPreview",
"author / lastEditedBy",
"postedIn target",
"timestamp",
"comment status",
"detail dialog controls"
]
}
},
"user-management": {
"title": "User Management",
"auth": "admin",
"web": {
"pages": ["/admin/users"]
},
"rest": {
"routes": [
{
"path": "/api/admin/users",
"returns": "{ data: User[], pagination }"
},
{
"path": "/api/admin/users/[id]",
"method": "PATCH",
"returns": "{ user: User }"
}
]
},
"mcp": "unavailable",
"display": {
"fields": [
"user.email",
"user.name",
"user.username",
"user.createdAt",
"Is admin checkbox",
"Actions: edit profile/admin state, suspend/unsuspend"
]
}
},
"oauth-client-management": {
"title": "OAuth Client Management",
"auth": "admin",
"web": {
"pages": ["/admin/oauth"]
},
"rest": "unavailable",
"mcp": "unavailable",
"display": {
"fields": [
"client.name",
"client.clientId",
"client.redirectUris[]",
"client.scopes[]",
"client.tokenEndpointAuthMethod",
"client.isTrusted",
"Action: delete"
]
}
},
"bus-management": {
"title": "Bus Management",
"auth": "admin",
"web": {
"pages": ["/admin/bus"]
},
"rest": "unavailable",
"mcp": "unavailable",
"display": {
"fields": [
"Bus schedule version title",
"version key",
"tripCount",
"importedAt",
"effective range",
"enabled status",
"Actions: import, activate, delete"
]
}
}
}
}