Skip to content

Commit bce08f8

Browse files
committed
fix(router): require AdminWrite scope for URL test related routes
1 parent c278c6a commit bce08f8

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎assets‎

‎routers/router.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,7 @@ func initMasterRouter(dep dependency.Dep) *gin.Engine {
928928
tool := admin.Group("tool")
929929
{
930930
tool.GET("wopi",
931+
middleware.RequiredScopes(types.ScopeAdminWrite),
931932
controllers.FromQuery[adminsvc.FetchWOPIDiscoveryService](adminsvc.FetchWOPIDiscoveryParamCtx{}),
932933
controllers.AdminFetchWopi,
933934
)
@@ -936,6 +937,7 @@ func initMasterRouter(dep dependency.Dep) *gin.Engine {
936937
controllers.FromJSON[adminsvc.ThumbGeneratorTestService](adminsvc.ThumbGeneratorTestParamCtx{}),
937938
controllers.AdminTestThumbGenerator)
938939
tool.POST("mail",
940+
middleware.RequiredScopes(types.ScopeAdminWrite),
939941
controllers.FromJSON[adminsvc.TestSMTPService](adminsvc.TestSMTPParamCtx{}),
940942
controllers.AdminSendTestMail,
941943
)

0 commit comments

Comments
 (0)