mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +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"
|
"type": "array"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
|
||||||
"name",
|
|
||||||
"permissions"
|
|
||||||
],
|
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"ActivityCreateDto": {
|
"ActivityCreateDto": {
|
||||||
|
|
|
||||||
|
|
@ -415,8 +415,8 @@ export type ApiKeyCreateResponseDto = {
|
||||||
secret: string;
|
secret: string;
|
||||||
};
|
};
|
||||||
export type ApiKeyUpdateDto = {
|
export type ApiKeyUpdateDto = {
|
||||||
name: string;
|
name?: string;
|
||||||
permissions: Permission[];
|
permissions?: Permission[];
|
||||||
};
|
};
|
||||||
export type AssetBulkDeleteDto = {
|
export type AssetBulkDeleteDto = {
|
||||||
force?: boolean;
|
force?: boolean;
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,16 @@ export class APIKeyCreateDto {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class APIKeyUpdateDto {
|
export class APIKeyUpdateDto {
|
||||||
|
@Optional()
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
name!: string;
|
name?: string;
|
||||||
|
|
||||||
|
@Optional()
|
||||||
@IsEnum(Permission, { each: true })
|
@IsEnum(Permission, { each: true })
|
||||||
@ApiProperty({ enum: Permission, enumName: 'Permission', isArray: true })
|
@ApiProperty({ enum: Permission, enumName: 'Permission', isArray: true })
|
||||||
@ArrayMinSize(1)
|
@ArrayMinSize(1)
|
||||||
permissions!: Permission[];
|
permissions?: Permission[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class APIKeyCreateResponseDto {
|
export class APIKeyCreateResponseDto {
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,13 @@
|
||||||
Permission.PersonReassign,
|
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', [
|
permissions.set('sharedLink', [
|
||||||
Permission.SharedLinkCreate,
|
Permission.SharedLinkCreate,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue