Merged 5.2.N (5.2.2) to HEAD (5.2)

134040 rmunteanu: REPO-1752, REPO-1753: Create person with an id that contains "/" does not return an error
      - Added username validation on create person.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@137333 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2017-06-14 16:56:02 +00:00
parent f7989073a7
commit 7b013ec1c5
2 changed files with 26 additions and 2 deletions

View File

@@ -289,8 +289,18 @@ public class TestPeople extends EnterpriseTestApi
assertEquals("userStatus", p.getUserStatus());
assertEquals(true, p.isEnabled());
assertEquals(true, p.isEmailNotificationsEnabled());
// -ve tests
// create person with username too long
person.setUserName("myUserName11111111111111111111111111111111111111111111111111111111111111111111111111111111@" + account1.getId());
people.create(person, 400);
// create person with special character '/'
person.setUserName("myUser/Name@" + account1.getId());
people.create(person, 400);
}
@Test
public void testCreatePerson_canCreateDisabledPerson() throws PublicApiException
{
@@ -703,7 +713,7 @@ public class TestPeople extends EnterpriseTestApi
assertTrue(person.getAspectNames().contains("papi:dessertable"));
return person;
}
@Test
public void testUpdatePerson_withCustomProps() throws Exception
{