From 22a8057ea4c94f7740d81093ffcabd2014e95f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 25 Oct 2023 15:29:41 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E7=A6=81=E7=94=A8=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/dromara/web/controller/AuthController.java | 3 +++ ruoyi-admin/src/main/resources/i18n/messages.properties | 1 + ruoyi-admin/src/main/resources/i18n/messages_en_US.properties | 1 + ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties | 1 + 4 files changed, 6 insertions(+) diff --git a/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java b/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java index 3c03e424..e41b4d01 100644 --- a/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java +++ b/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java @@ -10,6 +10,7 @@ import me.zhyd.oauth.model.AuthResponse; import me.zhyd.oauth.model.AuthUser; import me.zhyd.oauth.request.AuthRequest; import me.zhyd.oauth.utils.AuthStateUtils; +import org.dromara.common.core.constant.UserConstants; import org.dromara.common.core.domain.R; import org.dromara.common.core.domain.model.LoginBody; import org.dromara.common.core.domain.model.RegisterBody; @@ -78,6 +79,8 @@ public class AuthController { if (ObjectUtil.isNull(client) || !StringUtils.contains(client.getGrantType(), grantType)) { log.info("客户端id: {} 认证类型:{} 异常!.", clientId, grantType); return R.fail(MessageUtils.message("auth.grant.type.error")); + } else if (!UserConstants.NORMAL.equals(client.getStatus())) { + return R.fail(MessageUtils.message("auth.grant.type.stop")); } // 校验租户 loginService.checkTenant(loginBody.getTenantId()); diff --git a/ruoyi-admin/src/main/resources/i18n/messages.properties b/ruoyi-admin/src/main/resources/i18n/messages.properties index 5c9f4227..c8635612 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages.properties @@ -29,6 +29,7 @@ user.notfound=请重新登录 user.forcelogout=管理员强制退出,请重新登录 user.unknown.error=未知错误,请重新登录 auth.grant.type.error=认证权限类型错误 +auth.grant.type.blocked=认证权限类型已禁用 auth.grant.type.not.blank=认证权限类型不能为空 auth.clientid.not.blank=认证客户端id不能为空 ##文件上传消息 diff --git a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties index 2ab82a66..355da843 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties @@ -29,6 +29,7 @@ user.notfound=Please login again user.forcelogout=The administrator is forced to exit,please login again user.unknown.error=Unknown error, please login again auth.grant.type.error=Auth grant type error +auth.grant.type.blocked=Auth grant type disabled auth.grant.type.not.blank=Auth grant type cannot be blank auth.clientid.not.blank=Auth clientid cannot be blank ##文件上传消息 diff --git a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties index 5c9f4227..c8635612 100644 --- a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties +++ b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties @@ -29,6 +29,7 @@ user.notfound=请重新登录 user.forcelogout=管理员强制退出,请重新登录 user.unknown.error=未知错误,请重新登录 auth.grant.type.error=认证权限类型错误 +auth.grant.type.blocked=认证权限类型已禁用 auth.grant.type.not.blank=认证权限类型不能为空 auth.clientid.not.blank=认证客户端id不能为空 ##文件上传消息