mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Rename authority and person exceptions for MNT-20764 (#978)
This commit is contained in:
@@ -1670,7 +1670,7 @@ public class AuthorityDAOImpl implements AuthorityDAO, NodeServicePolicies.Befor
|
||||
{
|
||||
if (authorityName.indexOf(illegalCharacter) != -1)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Group name contains characters that are not permitted: "+authorityName.charAt(authorityName.indexOf(illegalCharacter)));
|
||||
throw new AuthorityException("Group name contains characters that are not permitted: "+authorityName.charAt(authorityName.indexOf(illegalCharacter)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1797,7 +1797,7 @@ public class PersonServiceImpl extends TransactionListenerAdapter implements Per
|
||||
{
|
||||
if (userName.indexOf(illegalCharacter) != -1)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Person name contains characters that are not permitted: "+userName.charAt(userName.indexOf(illegalCharacter)));
|
||||
throw new PersonException("Person name contains characters that are not permitted: "+userName.charAt(userName.indexOf(illegalCharacter)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -261,9 +261,9 @@ public class AuthorityServiceTest extends TestCase
|
||||
try
|
||||
{
|
||||
authorityService.createAuthority(AuthorityType.GROUP, groupName);
|
||||
fail("AlfrescoRuntimeException not caught for illegalCharacter: " +groupName.charAt(groupName.indexOf(illegalCharacter)));
|
||||
fail("AuthorityException not caught for illegalCharacter: " +groupName.charAt(groupName.indexOf(illegalCharacter)));
|
||||
}
|
||||
catch (AlfrescoRuntimeException ignored)
|
||||
catch (AuthorityException ignored)
|
||||
{
|
||||
// Expected
|
||||
}
|
||||
|
@@ -467,9 +467,9 @@ public class PersonTest extends TestCase
|
||||
try
|
||||
{
|
||||
personService.createPerson(createDefaultProperties(personName, "Some", "User", "some.user@example.com", "alfresco", rootNodeRef));
|
||||
fail("AlfrescoRuntimeException not caught for illegalCharacter: " +personName.charAt(personName.indexOf(illegalCharacter)));
|
||||
fail("PersonException not caught for illegalCharacter: " +personName.charAt(personName.indexOf(illegalCharacter)));
|
||||
}
|
||||
catch (AlfrescoRuntimeException ignored)
|
||||
catch (PersonException ignored)
|
||||
{
|
||||
// Expected
|
||||
}
|
||||
|
Reference in New Issue
Block a user