feat(tenant): 按租户隔离用户身份与后台权限

This commit is contained in:
yml
2026-11-15 15:37:23 +08:00
parent ca57f604bf
commit abf0fce89b
43 changed files with 1572 additions and 196 deletions
@@ -126,6 +126,8 @@ func writeError(c *gin.Context, err error) {
response.ServiceUnavailable(c, "数据库未连接")
case errors.Is(err, ErrProtectedRole):
response.BadRequest(c, "该角色为系统内置角色,不可删除")
case errors.Is(err, ErrPlatformAdminRequired):
response.Error(c, http.StatusForbidden, "forbidden", "仅平台超级管理员可以修改全局角色")
case IsNotFound(err):
response.Error(c, http.StatusNotFound, "not_found", "角色不存在")
default: