1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-24 04:46:50 +02:00

feat(server,web): add force delete to immediately remove user (#7681)

* feat(server,web): add force delete to immediately remove user

* update wording on force delete confirmation

* fix force delete css

* PR feedback

* cleanup user service delete for force

* adding user status column

* some cleanup and tests

* more test fixes

* run npm run sql:generate

* chore: cleanup and websocket

* chore: linting

* userRepository.restore

* removed bad color class from delete-confirm-dialoge

* additional confirmation for user force delete

* shorten confirmation message

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Sam Holton
2024-03-08 17:49:39 -05:00
committed by GitHub
parent 9cb0a1ffbf
commit 7a4ae7d142
47 changed files with 628 additions and 97 deletions

View File

@ -157,19 +157,21 @@ class UserApi {
/// Parameters:
///
/// * [String] id (required):
Future<Response> deleteUserWithHttpInfo(String id,) async {
///
/// * [DeleteUserDto] deleteUserDto (required):
Future<Response> deleteUserWithHttpInfo(String id, DeleteUserDto deleteUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/user/{id}'
.replaceAll('{id}', id);
// ignore: prefer_final_locals
Object? postBody;
Object? postBody = deleteUserDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
@ -186,8 +188,10 @@ class UserApi {
/// Parameters:
///
/// * [String] id (required):
Future<UserResponseDto?> deleteUser(String id,) async {
final response = await deleteUserWithHttpInfo(id,);
///
/// * [DeleteUserDto] deleteUserDto (required):
Future<UserResponseDto?> deleteUser(String id, DeleteUserDto deleteUserDto,) async {
final response = await deleteUserWithHttpInfo(id, deleteUserDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}