mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-28 14:23:52 +00:00
Update NotePermissionsUpdate DTOs to be aware of groups
The NotePermissionsUpdateDto was not updated when group permissions were introduced. Signed-off-by: David Mehren <git@herrmehren.de> Co-authored-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
23c07dc67d
commit
61014f1bc4
1 changed files with 12 additions and 2 deletions
|
@ -8,7 +8,7 @@ export class NoteUserPermissionEntryDto {
|
|||
canEdit: boolean;
|
||||
}
|
||||
|
||||
export class NotePermissionEntryUpdateDto {
|
||||
export class NoteUserPermissionUpdateDto {
|
||||
@IsString()
|
||||
username: string;
|
||||
@IsBoolean()
|
||||
|
@ -31,6 +31,13 @@ export class NoteGroupPermissionEntryDto {
|
|||
canEdit: boolean;
|
||||
}
|
||||
|
||||
export class NoteGroupPermissionUpdateDto {
|
||||
@IsString()
|
||||
groupname: string;
|
||||
@IsBoolean()
|
||||
canEdit: boolean;
|
||||
}
|
||||
|
||||
export class NotePermissionsDto {
|
||||
@ValidateNested()
|
||||
owner: UserInfoDto;
|
||||
|
@ -45,5 +52,8 @@ export class NotePermissionsDto {
|
|||
export class NotePermissionsUpdateDto {
|
||||
@IsArray()
|
||||
@ValidateNested()
|
||||
sharedTo: NotePermissionEntryUpdateDto[];
|
||||
sharedToUsers: NoteUserPermissionUpdateDto[];
|
||||
@IsArray()
|
||||
@ValidateNested()
|
||||
sharedToGroups: NoteGroupPermissionUpdateDto[];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue