Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

58165: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      58031: Reverse merged (again) in V4.2-BUG-FIX - merged the wrong commit
         58030: Merged V4.1-BUG-FIX (4.1.8) 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@61930 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 22:46:18 +00:00
parent 5bf400fac6
commit d447b6b36a
2 changed files with 1 additions and 35 deletions

View File

@@ -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;
}