feat(ui): 后端加权限验证

This commit is contained in:
吴汉强
2024-03-14 15:39:12 +08:00
parent 1ab2185ff1
commit 90930ea9f9
16 changed files with 135 additions and 7 deletions

View File

@@ -71,6 +71,11 @@ func (h *ConfigHandler) Update(c *gin.Context) {
// Get 获取指定的系统配置
func (h *ConfigHandler) Get(c *gin.Context) {
if err := utils.CheckPermission(c, h.db); err != nil {
resp.ERROR(c, types.NoPermission)
return
}
key := c.Query("key")
var config model.Config
res := h.db.Where("marker", key).First(&config)