[ACA-1634] update peopleApi to use alfresco-ja-api-node in e2e (#558)

* update peopleApi to use alfresco-ja-api-node in e2e

* small code improvement
This commit is contained in:
Adina Parpalita
2018-08-09 20:51:45 +03:00
committed by Denys Vuika
parent b8cc5422f4
commit 8c76d92f47
29 changed files with 76 additions and 80 deletions

View File

@@ -23,21 +23,31 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export class Person {
id?: string;
export interface PersonModel {
username?: string;
password?: string;
firstName?: string;
lastName?: string;
email?: string;
enabled?: boolean;
properties?: any;
}
constructor(username: string, password: string, details: Person) {
this.id = username;
this.password = password || username;
this.firstName = username;
this.lastName = username;
this.email = `${username}@alfresco.com`;
export class Person {
id: string;
password: string;
firstName: string;
lastName: string;
email: string;
enabled: boolean;
properties: any;
Object.assign(this, details);
constructor(user: PersonModel) {
this.id = user.username;
this.password = user.password || user.username;
this.firstName = user.firstName || user.username;
this.lastName = user.lastName || user.username;
this.email = user.email || `${user.username}@alfresco.com`;
this.enabled = user.enabled || true;
}
}