mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-06 01:21:39 -04:00
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:
parent
577811be29
commit
34087561e7
16 changed files with 220 additions and 38 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue