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:
David Mehren 2020-10-03 12:42:14 +02:00
parent 23c07dc67d
commit 61014f1bc4
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -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[];
}