Skip to content

Commit

Permalink
Fixed handling of groups inherited from ACE
Browse files Browse the repository at this point in the history
  • Loading branch information
mspasiano committed Sep 7, 2023
1 parent c7a3994 commit bedd981
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ public class CommonRepository {
@Cacheable(value="managers-call", key="#userId")
public Map<String, List<SiperSede>> getManagersCall(String userId, CMISUser user, BindingSession session){
Map<String, List<SiperSede>> result = new HashMap<String, List<SiperSede>>();
if (user.getGroupsArray().stream().filter(s -> s.equalsIgnoreCase(JcononGroups.CONCORSI.group())).findAny().isPresent()) {
cacheRepository.getCallType()
.stream()
.map(objectTypeCache -> objectTypeCache.getId())
.forEach(s -> {
result.put(s, Collections.emptyList());
});
return result;
}
try {
String link = cmisService.getBaseURL().concat(DEFINITIONS_URL).concat(userId);
UrlBuilder urlBuilder = new UrlBuilder(link);
Expand Down

0 comments on commit bedd981

Please sign in to comment.