mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -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
292944ed78
commit
b1683a5c64
16 changed files with 220 additions and 38 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
import { IsArray, IsBoolean, IsString, ValidateNested } from 'class-validator';
|
||||
import { UserInfoDto } from '../users/user-info.dto';
|
||||
import { GroupInfoDto } from '../groups/group-info.dto';
|
||||
|
||||
export class NoteUserPermissionEntryDto {
|
||||
/**
|
||||
|
@ -38,30 +39,6 @@ export class NoteUserPermissionUpdateDto {
|
|||
canEdit: boolean;
|
||||
}
|
||||
|
||||
export class GroupInfoDto {
|
||||
/**
|
||||
* Name of the group
|
||||
* @example "superheroes"
|
||||
*/
|
||||
@IsString()
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Display name of this group
|
||||
* @example "Superheroes"
|
||||
*/
|
||||
@IsString()
|
||||
displayName: string;
|
||||
|
||||
/**
|
||||
* True if this group must be specially handled
|
||||
* Used for e.g. "everybody", "all logged in users"
|
||||
* @example false
|
||||
*/
|
||||
@IsBoolean()
|
||||
special: boolean;
|
||||
}
|
||||
|
||||
export class NoteGroupPermissionEntryDto {
|
||||
/**
|
||||
* Group this permission applies to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue