Merge release/V2.7.0.x into release/V2.7 (#1146)

* Update copyright header for 2020.

* MNT-21585 - Having EVERYONE in original ACL causes IPR duplication (#1144)

* MNT-21585 - Having EVERYONE in original authorities causes IPR duplication

* Update License Headers

* prevent NPE when authorities is null and refactored findIPRGroup method

* RM-7131 Update old gitlab repo links with the new one from github

(cherry picked from commit 50cced2cb6)

* Change SCM URLs in order to switch to SSH authentication with 2FA for Github

(cherry picked from commit 7541e46ac4)

* [maven-release-plugin] prepare release V2.7.0.2

* [maven-release-plugin] prepare for next development iteration

Co-authored-by: Tom Page <thomas.page@alfresco.com>
Co-authored-by: Claudia Agache <claudia.agache@ness.com>
Co-authored-by: alfresco-build <info@alfresco.com>
This commit is contained in:
evasques
2020-06-09 17:17:49 +01:00
committed by GitHub
parent 6fb066b05a
commit 109f416d0f

View File

@@ -407,13 +407,12 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
// if exists and matches we have found our group
if (isIPRGroupTrueMatch(group, authorities))
{
iprGroup = group;
break;
return new Pair<String, Integer>(group, nextGroupIndex);
}
}
// determine if there are any more pages to inspect
hasMoreItems = results.hasMoreItems();
hasMoreItems = hasMoreItems ? results.hasMoreItems() : false;
pageCount ++;
}
@@ -429,8 +428,15 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
*/
private boolean isIPRGroupTrueMatch(String group, Set<String> authorities)
{
//Remove GROUP_EVERYONE for proper comparison as GROUP_EVERYONE is never included in an IPR group
Set<String> plainAuthorities = new HashSet<String>();
if (authorities != null)
{
plainAuthorities.addAll(authorities);
plainAuthorities.remove(PermissionService.ALL_AUTHORITIES);
}
Set<String> contained = authorityService.getContainedAuthorities(null, group, true);
return contained.equals(authorities);
return contained.equals(plainAuthorities);
}
/**