feat(server,web): make user deletion delay configurable (#7663)
* feat(server,web): make user deletion delay configurable * alphabetical order * add min for user.deleteDelay in SettingInputField * make config.user.deleteDelay SettingInputField min consistent format * fix e2e test * update description on user delete delay
This commit is contained in:
Generated
+3
@@ -160,6 +160,7 @@ doc/SystemConfigTemplateStorageOptionDto.md
|
||||
doc/SystemConfigThemeDto.md
|
||||
doc/SystemConfigThumbnailDto.md
|
||||
doc/SystemConfigTrashDto.md
|
||||
doc/SystemConfigUserDto.md
|
||||
doc/TagApi.md
|
||||
doc/TagResponseDto.md
|
||||
doc/TagTypeEnum.md
|
||||
@@ -357,6 +358,7 @@ lib/model/system_config_template_storage_option_dto.dart
|
||||
lib/model/system_config_theme_dto.dart
|
||||
lib/model/system_config_thumbnail_dto.dart
|
||||
lib/model/system_config_trash_dto.dart
|
||||
lib/model/system_config_user_dto.dart
|
||||
lib/model/tag_response_dto.dart
|
||||
lib/model/tag_type_enum.dart
|
||||
lib/model/thumbnail_format.dart
|
||||
@@ -539,6 +541,7 @@ test/system_config_template_storage_option_dto_test.dart
|
||||
test/system_config_theme_dto_test.dart
|
||||
test/system_config_thumbnail_dto_test.dart
|
||||
test/system_config_trash_dto_test.dart
|
||||
test/system_config_user_dto_test.dart
|
||||
test/tag_api_test.dart
|
||||
test/tag_response_dto_test.dart
|
||||
test/tag_type_enum_test.dart
|
||||
|
||||
Generated
+1
@@ -355,6 +355,7 @@ Class | Method | HTTP request | Description
|
||||
- [SystemConfigThemeDto](doc//SystemConfigThemeDto.md)
|
||||
- [SystemConfigThumbnailDto](doc//SystemConfigThumbnailDto.md)
|
||||
- [SystemConfigTrashDto](doc//SystemConfigTrashDto.md)
|
||||
- [SystemConfigUserDto](doc//SystemConfigUserDto.md)
|
||||
- [TagResponseDto](doc//TagResponseDto.md)
|
||||
- [TagTypeEnum](doc//TagTypeEnum.md)
|
||||
- [ThumbnailFormat](doc//ThumbnailFormat.md)
|
||||
|
||||
Generated
+1
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
||||
**loginPageMessage** | **String** | |
|
||||
**oauthButtonText** | **String** | |
|
||||
**trashDays** | **int** | |
|
||||
**userDeleteDelay** | **int** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Generated
+1
@@ -23,6 +23,7 @@ Name | Type | Description | Notes
|
||||
**theme** | [**SystemConfigThemeDto**](SystemConfigThemeDto.md) | |
|
||||
**thumbnail** | [**SystemConfigThumbnailDto**](SystemConfigThumbnailDto.md) | |
|
||||
**trash** | [**SystemConfigTrashDto**](SystemConfigTrashDto.md) | |
|
||||
**user** | [**SystemConfigUserDto**](SystemConfigUserDto.md) | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
# openapi.model.SystemConfigUserDto
|
||||
|
||||
## Load the model package
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
```
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**deleteDelay** | **int** | |
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Generated
+1
@@ -190,6 +190,7 @@ part 'model/system_config_template_storage_option_dto.dart';
|
||||
part 'model/system_config_theme_dto.dart';
|
||||
part 'model/system_config_thumbnail_dto.dart';
|
||||
part 'model/system_config_trash_dto.dart';
|
||||
part 'model/system_config_user_dto.dart';
|
||||
part 'model/tag_response_dto.dart';
|
||||
part 'model/tag_type_enum.dart';
|
||||
part 'model/thumbnail_format.dart';
|
||||
|
||||
Generated
+2
@@ -462,6 +462,8 @@ class ApiClient {
|
||||
return SystemConfigThumbnailDto.fromJson(value);
|
||||
case 'SystemConfigTrashDto':
|
||||
return SystemConfigTrashDto.fromJson(value);
|
||||
case 'SystemConfigUserDto':
|
||||
return SystemConfigUserDto.fromJson(value);
|
||||
case 'TagResponseDto':
|
||||
return TagResponseDto.fromJson(value);
|
||||
case 'TagTypeEnum':
|
||||
|
||||
+11
-3
@@ -19,6 +19,7 @@ class ServerConfigDto {
|
||||
required this.loginPageMessage,
|
||||
required this.oauthButtonText,
|
||||
required this.trashDays,
|
||||
required this.userDeleteDelay,
|
||||
});
|
||||
|
||||
String externalDomain;
|
||||
@@ -33,6 +34,8 @@ class ServerConfigDto {
|
||||
|
||||
int trashDays;
|
||||
|
||||
int userDeleteDelay;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ServerConfigDto &&
|
||||
other.externalDomain == externalDomain &&
|
||||
@@ -40,7 +43,8 @@ class ServerConfigDto {
|
||||
other.isOnboarded == isOnboarded &&
|
||||
other.loginPageMessage == loginPageMessage &&
|
||||
other.oauthButtonText == oauthButtonText &&
|
||||
other.trashDays == trashDays;
|
||||
other.trashDays == trashDays &&
|
||||
other.userDeleteDelay == userDeleteDelay;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@@ -50,10 +54,11 @@ class ServerConfigDto {
|
||||
(isOnboarded.hashCode) +
|
||||
(loginPageMessage.hashCode) +
|
||||
(oauthButtonText.hashCode) +
|
||||
(trashDays.hashCode);
|
||||
(trashDays.hashCode) +
|
||||
(userDeleteDelay.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, oauthButtonText=$oauthButtonText, trashDays=$trashDays]';
|
||||
String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, oauthButtonText=$oauthButtonText, trashDays=$trashDays, userDeleteDelay=$userDeleteDelay]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -63,6 +68,7 @@ class ServerConfigDto {
|
||||
json[r'loginPageMessage'] = this.loginPageMessage;
|
||||
json[r'oauthButtonText'] = this.oauthButtonText;
|
||||
json[r'trashDays'] = this.trashDays;
|
||||
json[r'userDeleteDelay'] = this.userDeleteDelay;
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -80,6 +86,7 @@ class ServerConfigDto {
|
||||
loginPageMessage: mapValueOfType<String>(json, r'loginPageMessage')!,
|
||||
oauthButtonText: mapValueOfType<String>(json, r'oauthButtonText')!,
|
||||
trashDays: mapValueOfType<int>(json, r'trashDays')!,
|
||||
userDeleteDelay: mapValueOfType<int>(json, r'userDeleteDelay')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@@ -133,6 +140,7 @@ class ServerConfigDto {
|
||||
'loginPageMessage',
|
||||
'oauthButtonText',
|
||||
'trashDays',
|
||||
'userDeleteDelay',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+11
-3
@@ -28,6 +28,7 @@ class SystemConfigDto {
|
||||
required this.theme,
|
||||
required this.thumbnail,
|
||||
required this.trash,
|
||||
required this.user,
|
||||
});
|
||||
|
||||
SystemConfigFFmpegDto ffmpeg;
|
||||
@@ -60,6 +61,8 @@ class SystemConfigDto {
|
||||
|
||||
SystemConfigTrashDto trash;
|
||||
|
||||
SystemConfigUserDto user;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigDto &&
|
||||
other.ffmpeg == ffmpeg &&
|
||||
@@ -76,7 +79,8 @@ class SystemConfigDto {
|
||||
other.storageTemplate == storageTemplate &&
|
||||
other.theme == theme &&
|
||||
other.thumbnail == thumbnail &&
|
||||
other.trash == trash;
|
||||
other.trash == trash &&
|
||||
other.user == user;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@@ -95,10 +99,11 @@ class SystemConfigDto {
|
||||
(storageTemplate.hashCode) +
|
||||
(theme.hashCode) +
|
||||
(thumbnail.hashCode) +
|
||||
(trash.hashCode);
|
||||
(trash.hashCode) +
|
||||
(user.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, newVersionCheck=$newVersionCheck, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, theme=$theme, thumbnail=$thumbnail, trash=$trash]';
|
||||
String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, newVersionCheck=$newVersionCheck, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, theme=$theme, thumbnail=$thumbnail, trash=$trash, user=$user]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -117,6 +122,7 @@ class SystemConfigDto {
|
||||
json[r'theme'] = this.theme;
|
||||
json[r'thumbnail'] = this.thumbnail;
|
||||
json[r'trash'] = this.trash;
|
||||
json[r'user'] = this.user;
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -143,6 +149,7 @@ class SystemConfigDto {
|
||||
theme: SystemConfigThemeDto.fromJson(json[r'theme'])!,
|
||||
thumbnail: SystemConfigThumbnailDto.fromJson(json[r'thumbnail'])!,
|
||||
trash: SystemConfigTrashDto.fromJson(json[r'trash'])!,
|
||||
user: SystemConfigUserDto.fromJson(json[r'user'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@@ -205,6 +212,7 @@ class SystemConfigDto {
|
||||
'theme',
|
||||
'thumbnail',
|
||||
'trash',
|
||||
'user',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class SystemConfigUserDto {
|
||||
/// Returns a new [SystemConfigUserDto] instance.
|
||||
SystemConfigUserDto({
|
||||
required this.deleteDelay,
|
||||
});
|
||||
|
||||
int deleteDelay;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigUserDto &&
|
||||
other.deleteDelay == deleteDelay;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(deleteDelay.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigUserDto[deleteDelay=$deleteDelay]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'deleteDelay'] = this.deleteDelay;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SystemConfigUserDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SystemConfigUserDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SystemConfigUserDto(
|
||||
deleteDelay: mapValueOfType<int>(json, r'deleteDelay')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SystemConfigUserDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SystemConfigUserDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SystemConfigUserDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SystemConfigUserDto> mapFromJson(dynamic json) {
|
||||
final map = <String, SystemConfigUserDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SystemConfigUserDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SystemConfigUserDto-objects as value to a dart map
|
||||
static Map<String, List<SystemConfigUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SystemConfigUserDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SystemConfigUserDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'deleteDelay',
|
||||
};
|
||||
}
|
||||
|
||||
+5
@@ -46,6 +46,11 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// int userDeleteDelay
|
||||
test('to test the property `userDeleteDelay`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
+5
@@ -91,6 +91,11 @@ void main() {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// SystemConfigUserDto user
|
||||
test('to test the property `user`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for SystemConfigUserDto
|
||||
void main() {
|
||||
// final instance = SystemConfigUserDto();
|
||||
|
||||
group('test SystemConfigUserDto', () {
|
||||
// int deleteDelay
|
||||
test('to test the property `deleteDelay`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user