refactor platform menus and entity statuses

This commit is contained in:
david
2026-07-29 13:18:52 +08:00
parent 978dc446d9
commit afd9dbdeb5
48 changed files with 510 additions and 421 deletions

View File

@@ -49,7 +49,7 @@ func Login(ctx *gin.Context) {
infra.Response.Error(ctx, err)
return
}
if account.Status != "enabled" {
if account.Status != common.StatusEnable {
infra.Response.Error(ctx, errcode.ErrAccountDisabled)
return
}
@@ -91,7 +91,7 @@ func CurrentProfile(ctx *gin.Context) {
infra.Response.Error(ctx, errcode.ErrRecordNotFound)
return
}
menus, err := common.LoadPlatformMenus(account.PlatformRoleCode)
menus, err := LoadPlatformMenus(account.PlatformRoleCode)
if err != nil {
infra.Response.Error(ctx, errcode.ErrPermissionDenied)
return