mirror of
https://github.com/samsonjs/immich.git
synced 2026-03-25 09:15:56 +00:00
fix: missing permissions and optional update (#18735)
* fix: missing permissions * fix: test
This commit is contained in:
parent
10181defb1
commit
6f39a706b2
5 changed files with 13 additions and 9 deletions
BIN
mobile/openapi/lib/model/api_key_update_dto.dart
generated
BIN
mobile/openapi/lib/model/api_key_update_dto.dart
generated
Binary file not shown.
|
|
@ -8335,10 +8335,6 @@
|
|||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"permissions"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ActivityCreateDto": {
|
||||
|
|
|
|||
|
|
@ -415,8 +415,8 @@ export type ApiKeyCreateResponseDto = {
|
|||
secret: string;
|
||||
};
|
||||
export type ApiKeyUpdateDto = {
|
||||
name: string;
|
||||
permissions: Permission[];
|
||||
name?: string;
|
||||
permissions?: Permission[];
|
||||
};
|
||||
export type AssetBulkDeleteDto = {
|
||||
force?: boolean;
|
||||
|
|
|
|||
|
|
@ -15,14 +15,16 @@ export class APIKeyCreateDto {
|
|||
}
|
||||
|
||||
export class APIKeyUpdateDto {
|
||||
@Optional()
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name!: string;
|
||||
name?: string;
|
||||
|
||||
@Optional()
|
||||
@IsEnum(Permission, { each: true })
|
||||
@ApiProperty({ enum: Permission, enumName: 'Permission', isArray: true })
|
||||
@ArrayMinSize(1)
|
||||
permissions!: Permission[];
|
||||
permissions?: Permission[];
|
||||
}
|
||||
|
||||
export class APIKeyCreateResponseDto {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,13 @@
|
|||
Permission.PersonReassign,
|
||||
]);
|
||||
|
||||
permissions.set('session', [Permission.SessionRead, Permission.SessionUpdate, Permission.SessionDelete]);
|
||||
permissions.set('session', [
|
||||
Permission.SessionCreate,
|
||||
Permission.SessionRead,
|
||||
Permission.SessionUpdate,
|
||||
Permission.SessionDelete,
|
||||
Permission.SessionLock,
|
||||
]);
|
||||
|
||||
permissions.set('sharedLink', [
|
||||
Permission.SharedLinkCreate,
|
||||
|
|
|
|||
Loading…
Reference in a new issue