Эх сурвалжийг харах

Merge remote-tracking branch 'origin/hotfix-access'

Hu Jie 6 жил өмнө
parent
commit
62f9c40c5e

+ 13 - 0
src/main/java/com/uas/platform/b2b/model/User.java

@@ -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;
 	}