示例#1
0
 @Transient
 public boolean isViewPerm(Collection<MemberGroup> groups, Collection<Org> orgs) {
   if (Reflections.containsAny(getViewGroups(), groups, "id")) {
     return true;
   }
   if (CollectionUtils.isNotEmpty(orgs) && Reflections.containsAny(getViewOrgs(), orgs, "id")) {
     return true;
   }
   return false;
 }
示例#2
0
 @Transient
 public boolean isContriPerm(User user, Collection<MemberGroup> groups) {
   if (!getRealNode()) {
     // 不是真实节点(没有信息的节点)不允许投稿
     return false;
   }
   Set<MemberGroup> contriGroups = getContriGroups();
   return Reflections.containsAny(contriGroups, groups, "id");
 }
示例#3
0
 @Transient
 public boolean isDataPerm(User user) {
   Integer siteId = getSite().getId();
   if (user.getAllNodePerm(siteId)
       || Reflections.contains(user.getNodePerms(siteId), getId(), "id")) {
     return true;
   }
   return false;
 }