From 7d088af59ffeb49b0a1ff578d4bddf04f961b0a1 Mon Sep 17 00:00:00 2001 From: smallchill Date: Fri, 29 Mar 2019 19:20:19 +0800 Subject: [PATCH] :tada: 2.1.1.RELEASE --- blade-core-boot/pom.xml | 2 +- blade-core-cloud/pom.xml | 2 +- blade-core-launch/pom.xml | 2 +- blade-core-log/pom.xml | 2 +- blade-core-mybatis/pom.xml | 2 +- blade-core-secure/pom.xml | 2 +- .../core/secure/utils/SecureUtil.java | 22 +++++++++++++++++++ blade-core-swagger/pom.xml | 2 +- blade-core-tool/pom.xml | 2 +- pom.xml | 4 ++-- 10 files changed, 32 insertions(+), 10 deletions(-) diff --git a/blade-core-boot/pom.xml b/blade-core-boot/pom.xml index fdc5fc3..7c1ab1e 100644 --- a/blade-core-boot/pom.xml +++ b/blade-core-boot/pom.xml @@ -5,7 +5,7 @@ org.springblade blade-tool - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-cloud/pom.xml b/blade-core-cloud/pom.xml index bdcefb1..4bf1274 100644 --- a/blade-core-cloud/pom.xml +++ b/blade-core-cloud/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-launch/pom.xml b/blade-core-launch/pom.xml index 6008080..43b1295 100644 --- a/blade-core-launch/pom.xml +++ b/blade-core-launch/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-log/pom.xml b/blade-core-log/pom.xml index d6bb2a2..36976e8 100644 --- a/blade-core-log/pom.xml +++ b/blade-core-log/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-mybatis/pom.xml b/blade-core-mybatis/pom.xml index ea54d22..2aa136f 100644 --- a/blade-core-mybatis/pom.xml +++ b/blade-core-mybatis/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-secure/pom.xml b/blade-core-secure/pom.xml index f95a64e..d8addd5 100644 --- a/blade-core-secure/pom.xml +++ b/blade-core-secure/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java b/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java index 0fc374e..9d00da6 100644 --- a/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java +++ b/blade-core-secure/src/main/java/org/springblade/core/secure/utils/SecureUtil.java @@ -162,6 +162,28 @@ public class SecureUtil { return (null == user) ? StringPool.EMPTY : user.getUserName(); } + /** + * 获取用户角色 + * + * @return userName + */ + public static String getUserRole() { + BladeUser user = getUser(); + return (null == user) ? StringPool.EMPTY : user.getRoleName(); + } + + /** + * 获取用角色 + * + * @param request request + * @return userName + */ + public static String getUserRole(HttpServletRequest request) { + BladeUser user = getUser(request); + return (null == user) ? StringPool.EMPTY : user.getRoleName(); + } + + /** * 获取租户编号 * diff --git a/blade-core-swagger/pom.xml b/blade-core-swagger/pom.xml index a2c6d95..9290121 100644 --- a/blade-core-swagger/pom.xml +++ b/blade-core-swagger/pom.xml @@ -5,7 +5,7 @@ blade-tool org.springblade - 2.1.0 + 2.1.1 4.0.0 diff --git a/blade-core-tool/pom.xml b/blade-core-tool/pom.xml index 802a074..7a48dd1 100644 --- a/blade-core-tool/pom.xml +++ b/blade-core-tool/pom.xml @@ -6,7 +6,7 @@ org.springblade blade-tool - 2.1.0 + 2.1.1 4.0.0 diff --git a/pom.xml b/pom.xml index e3607d6..4e98e1a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springblade blade-tool - 2.1.0 + 2.1.1 pom blade-tool @@ -36,7 +36,7 @@ - 2.1.0 + 2.1.1 1.8 3.8.0