refactor platform menus and entity statuses
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user