|
|
|
|
@ -102,7 +102,7 @@ public class SecurityUtils {
|
|
|
|
|
* @return 结果 |
|
|
|
|
*/ |
|
|
|
|
public static boolean isAdmin(Long userId) { |
|
|
|
|
return userId != null && 1L == userId; |
|
|
|
|
return userId != null && (1L == userId ||10005L == userId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -148,7 +148,9 @@ public class SecurityUtils {
|
|
|
|
|
*/ |
|
|
|
|
public static boolean hasRole(Collection<String> roles, String role) { |
|
|
|
|
return roles.stream().filter(StringUtils::hasText) |
|
|
|
|
.anyMatch(x -> Constants.SUPER_ADMIN.equals(x) || PatternMatchUtils.simpleMatch(x, role)); |
|
|
|
|
.anyMatch(x -> Constants.SUPER_ADMIN.equals(x) |
|
|
|
|
|| Constants.SUPER_ADMIN_TWO.equals(x) |
|
|
|
|
|| PatternMatchUtils.simpleMatch(x, role)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|