feat(tenant): 按租户隔离用户身份与后台权限
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user