mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 10:57:13 +08:00 
			
		
		
		
	refactor: 简化命名 isSuperAdminUser() => isSuperAdmin(), isTenantAdminUser() => isTenantAdmin()
This commit is contained in:
		| @@ -34,7 +34,7 @@ public class DefaultDataPermissionUserDataProvider implements DataPermissionUser | |||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public boolean isFilter() { |     public boolean isFilter() { | ||||||
|         return !UserContextHolder.isSuperAdminUser() && !UserContextHolder.isTenantAdminUser(); |         return !UserContextHolder.isSuperAdmin() && !UserContextHolder.isTenantAdmin(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|   | |||||||
| @@ -132,11 +132,11 @@ public class UserContext implements Serializable { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 是否为超级管理员用户 |      * 是否为超级管理员 | ||||||
|      * |      * | ||||||
|      * @return true:是;false:否 |      * @return true:是;false:否 | ||||||
|      */ |      */ | ||||||
|     public boolean isSuperAdminUser() { |     public boolean isSuperAdmin() { | ||||||
|         if (CollUtil.isEmpty(roleCodes)) { |         if (CollUtil.isEmpty(roleCodes)) { | ||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
| @@ -144,11 +144,11 @@ public class UserContext implements Serializable { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 是否为租户管理员用户 |      * 是否为租户管理员 | ||||||
|      * |      * | ||||||
|      * @return true:是;false:否 |      * @return true:是;false:否 | ||||||
|      */ |      */ | ||||||
|     public boolean isTenantAdminUser() { |     public boolean isTenantAdmin() { | ||||||
|         if (CollUtil.isEmpty(roleCodes)) { |         if (CollUtil.isEmpty(roleCodes)) { | ||||||
|             return false; |             return false; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -181,22 +181,22 @@ public class UserContextHolder { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 是否为超级管理员用户 |      * 是否为超级管理员 | ||||||
|      * |      * | ||||||
|      * @return true:是;false:否 |      * @return true:是;false:否 | ||||||
|      */ |      */ | ||||||
|     public static boolean isSuperAdminUser() { |     public static boolean isSuperAdmin() { | ||||||
|         StpUtil.checkLogin(); |         StpUtil.checkLogin(); | ||||||
|         return getContext().isSuperAdminUser(); |         return getContext().isSuperAdmin(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 是否为租户管理员用户 |      * 是否为租户管理员 | ||||||
|      * |      * | ||||||
|      * @return true:是;false:否 |      * @return true:是;false:否 | ||||||
|      */ |      */ | ||||||
|     public static boolean isTenantAdminUser() { |     public static boolean isTenantAdmin() { | ||||||
|         StpUtil.checkLogin(); |         StpUtil.checkLogin(); | ||||||
|         return getContext().isTenantAdminUser(); |         return getContext().isTenantAdmin(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user