You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-15 07:14:42 +02:00
feat(server): Add publicUsers toggle for user search (#14330)
* feat(server): Add publicUsers toggle for user search * tests * docs: add check:typescript for web PR checklist * return auth.user when publicUsers is false - app testing --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
10
mobile/openapi/lib/model/server_config_dto.dart
generated
10
mobile/openapi/lib/model/server_config_dto.dart
generated
@ -20,6 +20,7 @@ class ServerConfigDto {
|
||||
required this.mapDarkStyleUrl,
|
||||
required this.mapLightStyleUrl,
|
||||
required this.oauthButtonText,
|
||||
required this.publicUsers,
|
||||
required this.trashDays,
|
||||
required this.userDeleteDelay,
|
||||
});
|
||||
@ -38,6 +39,8 @@ class ServerConfigDto {
|
||||
|
||||
String oauthButtonText;
|
||||
|
||||
bool publicUsers;
|
||||
|
||||
int trashDays;
|
||||
|
||||
int userDeleteDelay;
|
||||
@ -51,6 +54,7 @@ class ServerConfigDto {
|
||||
other.mapDarkStyleUrl == mapDarkStyleUrl &&
|
||||
other.mapLightStyleUrl == mapLightStyleUrl &&
|
||||
other.oauthButtonText == oauthButtonText &&
|
||||
other.publicUsers == publicUsers &&
|
||||
other.trashDays == trashDays &&
|
||||
other.userDeleteDelay == userDeleteDelay;
|
||||
|
||||
@ -64,11 +68,12 @@ class ServerConfigDto {
|
||||
(mapDarkStyleUrl.hashCode) +
|
||||
(mapLightStyleUrl.hashCode) +
|
||||
(oauthButtonText.hashCode) +
|
||||
(publicUsers.hashCode) +
|
||||
(trashDays.hashCode) +
|
||||
(userDeleteDelay.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, mapDarkStyleUrl=$mapDarkStyleUrl, mapLightStyleUrl=$mapLightStyleUrl, oauthButtonText=$oauthButtonText, trashDays=$trashDays, userDeleteDelay=$userDeleteDelay]';
|
||||
String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, mapDarkStyleUrl=$mapDarkStyleUrl, mapLightStyleUrl=$mapLightStyleUrl, oauthButtonText=$oauthButtonText, publicUsers=$publicUsers, trashDays=$trashDays, userDeleteDelay=$userDeleteDelay]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -79,6 +84,7 @@ class ServerConfigDto {
|
||||
json[r'mapDarkStyleUrl'] = this.mapDarkStyleUrl;
|
||||
json[r'mapLightStyleUrl'] = this.mapLightStyleUrl;
|
||||
json[r'oauthButtonText'] = this.oauthButtonText;
|
||||
json[r'publicUsers'] = this.publicUsers;
|
||||
json[r'trashDays'] = this.trashDays;
|
||||
json[r'userDeleteDelay'] = this.userDeleteDelay;
|
||||
return json;
|
||||
@ -100,6 +106,7 @@ class ServerConfigDto {
|
||||
mapDarkStyleUrl: mapValueOfType<String>(json, r'mapDarkStyleUrl')!,
|
||||
mapLightStyleUrl: mapValueOfType<String>(json, r'mapLightStyleUrl')!,
|
||||
oauthButtonText: mapValueOfType<String>(json, r'oauthButtonText')!,
|
||||
publicUsers: mapValueOfType<bool>(json, r'publicUsers')!,
|
||||
trashDays: mapValueOfType<int>(json, r'trashDays')!,
|
||||
userDeleteDelay: mapValueOfType<int>(json, r'userDeleteDelay')!,
|
||||
);
|
||||
@ -156,6 +163,7 @@ class ServerConfigDto {
|
||||
'mapDarkStyleUrl',
|
||||
'mapLightStyleUrl',
|
||||
'oauthButtonText',
|
||||
'publicUsers',
|
||||
'trashDays',
|
||||
'userDeleteDelay',
|
||||
};
|
||||
|
@ -15,30 +15,36 @@ class SystemConfigServerDto {
|
||||
SystemConfigServerDto({
|
||||
required this.externalDomain,
|
||||
required this.loginPageMessage,
|
||||
required this.publicUsers,
|
||||
});
|
||||
|
||||
String externalDomain;
|
||||
|
||||
String loginPageMessage;
|
||||
|
||||
bool publicUsers;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigServerDto &&
|
||||
other.externalDomain == externalDomain &&
|
||||
other.loginPageMessage == loginPageMessage;
|
||||
other.loginPageMessage == loginPageMessage &&
|
||||
other.publicUsers == publicUsers;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(externalDomain.hashCode) +
|
||||
(loginPageMessage.hashCode);
|
||||
(loginPageMessage.hashCode) +
|
||||
(publicUsers.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigServerDto[externalDomain=$externalDomain, loginPageMessage=$loginPageMessage]';
|
||||
String toString() => 'SystemConfigServerDto[externalDomain=$externalDomain, loginPageMessage=$loginPageMessage, publicUsers=$publicUsers]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'externalDomain'] = this.externalDomain;
|
||||
json[r'loginPageMessage'] = this.loginPageMessage;
|
||||
json[r'publicUsers'] = this.publicUsers;
|
||||
return json;
|
||||
}
|
||||
|
||||
@ -53,6 +59,7 @@ class SystemConfigServerDto {
|
||||
return SystemConfigServerDto(
|
||||
externalDomain: mapValueOfType<String>(json, r'externalDomain')!,
|
||||
loginPageMessage: mapValueOfType<String>(json, r'loginPageMessage')!,
|
||||
publicUsers: mapValueOfType<bool>(json, r'publicUsers')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@ -102,6 +109,7 @@ class SystemConfigServerDto {
|
||||
static const requiredKeys = <String>{
|
||||
'externalDomain',
|
||||
'loginPageMessage',
|
||||
'publicUsers',
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user