Explorar o código

:tada: 2.1.1.RELEASE

smallchill %!s(int64=6) %!d(string=hai) anos
pai
achega
7d088af59f

+ 1 - 1
blade-core-boot/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.springblade</groupId>
         <artifactId>blade-tool</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
blade-core-cloud/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>blade-tool</artifactId>
         <groupId>org.springblade</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 

+ 1 - 1
blade-core-launch/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>blade-tool</artifactId>
         <groupId>org.springblade</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
blade-core-log/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>blade-tool</artifactId>
         <groupId>org.springblade</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
blade-core-mybatis/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>blade-tool</artifactId>
         <groupId>org.springblade</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
blade-core-secure/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>blade-tool</artifactId>
         <groupId>org.springblade</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 22 - 0
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();
+	}
+
+
 	/**
 	 * 获取租户编号
 	 *

+ 1 - 1
blade-core-swagger/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>blade-tool</artifactId>
         <groupId>org.springblade</groupId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 1 - 1
blade-core-tool/pom.xml

@@ -6,7 +6,7 @@
     <parent>
         <groupId>org.springblade</groupId>
         <artifactId>blade-tool</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1</version>
     </parent>
 
     <modelVersion>4.0.0</modelVersion>

+ 2 - 2
pom.xml

@@ -5,7 +5,7 @@
 
     <groupId>org.springblade</groupId>
     <artifactId>blade-tool</artifactId>
-    <version>2.1.0</version>
+    <version>2.1.1</version>
     <packaging>pom</packaging>
     <name>blade-tool</name>
     <description>
@@ -36,7 +36,7 @@
     </scm>
 
     <properties>
-        <blade.tool.version>2.1.0</blade.tool.version>
+        <blade.tool.version>2.1.1</blade.tool.version>
 
         <java.version>1.8</java.version>
         <maven.plugin.version>3.8.0</maven.plugin.version>