File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
235
235
web:: resource ( "" ) . route (
236
236
web:: post ( )
237
237
. to ( llm:: make_llm_request)
238
- . authorize ( Action :: Query ) ,
238
+ . authorize ( Action :: QueryLLM ) ,
239
239
) ,
240
240
) ;
241
241
@@ -263,7 +263,10 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
263
263
// GET "/readiness" ==> Readiness check as per https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes
264
264
. service ( web:: resource ( "/readiness" ) . route ( web:: get ( ) . to ( health_check:: readiness) ) )
265
265
// GET "/about" ==> Returns information about instance
266
- . service ( web:: resource ( "/about" ) . route ( web:: get ( ) . to ( about:: about) ) )
266
+ . service (
267
+ web:: resource ( "/about" )
268
+ . route ( web:: get ( ) . to ( about:: about) . authorize ( Action :: GetAbout ) ) ,
269
+ )
267
270
. service (
268
271
web:: scope ( "/logstream" )
269
272
. service (
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ pub enum Action {
36
36
DeleteUser ,
37
37
PutRoles ,
38
38
GetRole ,
39
+ GetAbout ,
40
+ QueryLLM ,
39
41
All ,
40
42
}
41
43
@@ -91,6 +93,8 @@ impl RoleBuilder {
91
93
Action :: PutRoles => Permission :: Unit ( action) ,
92
94
Action :: GetRole => Permission :: Unit ( action) ,
93
95
Action :: DeleteUser => Permission :: Unit ( action) ,
96
+ Action :: GetAbout => Permission :: Unit ( action) ,
97
+ Action :: QueryLLM => Permission :: Unit ( action) ,
94
98
Action :: All => Permission :: Stream ( action, self . stream . clone ( ) . unwrap ( ) ) ,
95
99
} ;
96
100
perms. push ( perm) ;
@@ -155,6 +159,8 @@ pub mod model {
155
159
Action :: PutRetention ,
156
160
Action :: PutAlert ,
157
161
Action :: GetAlert ,
162
+ Action :: GetAbout ,
163
+ Action :: QueryLLM ,
158
164
] ,
159
165
stream : Some ( "*" . to_string ( ) ) ,
160
166
tag : None ,
@@ -172,6 +178,8 @@ pub mod model {
172
178
Action :: GetRetention ,
173
179
Action :: PutAlert ,
174
180
Action :: GetAlert ,
181
+ Action :: GetAbout ,
182
+ Action :: QueryLLM ,
175
183
] ,
176
184
stream : None ,
177
185
tag : None ,
@@ -187,6 +195,8 @@ pub mod model {
187
195
Action :: GetStats ,
188
196
Action :: GetRetention ,
189
197
Action :: GetAlert ,
198
+ Action :: GetAbout ,
199
+ Action :: QueryLLM ,
190
200
] ,
191
201
stream : None ,
192
202
tag : None ,
You can’t perform that action at this time.
0 commit comments