Skip to content

Commit

Permalink
Merge branch 'stable-develop' of https://github.com/geonetwork/core-g…
Browse files Browse the repository at this point in the history
…eonetwork into stable-develop

Conflicts:
	core/src/main/java/org/fao/geonet/kernel/DataManager.java
  • Loading branch information
Jesse Eichar committed Jul 29, 2014
2 parents a208ca7 + 0c24a95 commit 75c324b
Show file tree
Hide file tree
Showing 112 changed files with 6,006 additions and 2,640 deletions.
9 changes: 6 additions & 3 deletions core/src/main/java/org/fao/geonet/kernel/AccessManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,13 @@ public boolean hasEditPermission(final ServiceContext context, final String id)

Specifications spec = where (UserGroupSpecs.hasProfile(Profile.Editor)).and(UserGroupSpecs.hasUserId(us.getUserIdAsInt()));

List<Integer> opAlloweds = new ArrayList<Integer>();
for (OperationAllowed opAllowed : allOpAlloweds) {
spec = spec.and(UserGroupSpecs.hasGroupId(opAllowed.getId().getGroupId()));
opAlloweds.add(opAllowed.getId().getGroupId());
}
return _userGroupRepository.findOne(spec) != null;
spec = spec.and(UserGroupSpecs.hasGroupIds(opAlloweds));

return (! _userGroupRepository.findAll(spec).isEmpty());
}

/**
Expand Down Expand Up @@ -568,4 +571,4 @@ private long getAddress(String ip) {
return a1<<24 | a2<<16 | a3<<8 | a4;
}
}
}
}
Loading

0 comments on commit 75c324b

Please sign in to comment.