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