mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-10-14 09:16:28 +00:00
fix🔒: add AuthCheckRole to /set-config
The group only had JWT, so any logged-in user could read and overwrite the system settings regardless of their own permissions.
This commit is contained in:
@@ -34,7 +34,7 @@ func registerSysConfigRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMidd
|
||||
r2.GET("", api.Get2SysApp)
|
||||
}
|
||||
|
||||
r3 := v1.Group("/set-config").Use(authMiddleware.MiddlewareFunc())
|
||||
r3 := v1.Group("/set-config").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
|
||||
{
|
||||
r3.PUT("", api.Update2Set)
|
||||
r3.GET("", api.Get2Set)
|
||||
|
||||
Reference in New Issue
Block a user