GroupsService: Create new GroupsService

This service is necessary as we plan to have functions to create and manipulate groups in the future.
The GroupInfoDto was moved from the file note-permissions.dto.ts to mimic the UserInfoDto.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-02-20 11:41:15 +01:00
parent 577811be29
commit 34087561e7
16 changed files with 220 additions and 38 deletions

View file

@ -40,4 +40,15 @@ export class Group {
})
@JoinTable()
members: User[];
// eslint-disable-next-line @typescript-eslint/no-empty-function
private constructor() {}
public static create(name: string, displayName: string): Group {
const newGroup = new Group();
newGroup.special = false; // this attribute should only be true for the two special groups
newGroup.name = name;
newGroup.displayName = displayName;
return newGroup;
}
}