mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57241: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 57221: Reverse Merge as it caused SiteServiceImplMoreTest deleteSiteAndRestoreEnsuringSiteGroupsAreRecovered to fail 57067: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 56942: Merged DEV to V4.1-BUG-FIX (4.1.7) 56883 : MNT-9794: Authorities with duplicate names can be easilly created using « AuthorityService » - Creation of the duplicated authorities is fixed. Unit tests are added. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61796 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -606,13 +606,7 @@ public class AuthorityServiceImpl implements AuthorityService, InitializingBean
|
||||
{
|
||||
checkTypeIsMutable(type);
|
||||
String name = getName(type, shortName);
|
||||
|
||||
//MNT-9794 fix. If authority with 'name' doesn't exist it will be created
|
||||
if (!authorityDAO.authorityExists(name))
|
||||
{
|
||||
authorityDAO.createAuthority(name, authorityDisplayName, authorityZones);
|
||||
}
|
||||
|
||||
authorityDAO.createAuthority(name, authorityDisplayName, authorityZones);
|
||||
return name;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user