|
|
@@ -351,6 +351,19 @@ public class User implements Serializable {
|
|
|
}
|
|
|
|
|
|
public boolean isSys() {
|
|
|
+ if (getIssys() == null) {
|
|
|
+ setCurrentEnterpriseRoles();
|
|
|
+ Set<Role> roles = getRoles();
|
|
|
+ if (!CollectionUtils.isEmpty(roles)) {
|
|
|
+ for (Role role : roles) {
|
|
|
+ // 超级账号
|
|
|
+ if (role.isSys()) {
|
|
|
+ setIssys(Constant.YES);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return getIssys() != null && getIssys() == Constant.YES;
|
|
|
}
|
|
|
|