1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

feat(server, web): add checkbox to create user screen for shouldChang… (#7598)

feat(server, web): add checkbox to create user screen for shouldChangePassword
This commit is contained in:
Sam Holton
2024-03-04 00:40:03 -05:00
committed by GitHub
parent e8b001f62f
commit 7ef202c8b2
7 changed files with 42 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ class CreateUserDto {
required this.name,
required this.password,
this.quotaSizeInBytes,
this.shouldChangePassword,
this.storageLabel,
});
@@ -37,6 +38,14 @@ class CreateUserDto {
int? quotaSizeInBytes;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? shouldChangePassword;
String? storageLabel;
@override
@@ -46,6 +55,7 @@ class CreateUserDto {
other.name == name &&
other.password == password &&
other.quotaSizeInBytes == quotaSizeInBytes &&
other.shouldChangePassword == shouldChangePassword &&
other.storageLabel == storageLabel;
@override
@@ -56,10 +66,11 @@ class CreateUserDto {
(name.hashCode) +
(password.hashCode) +
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
(shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) +
(storageLabel == null ? 0 : storageLabel!.hashCode);
@override
String toString() => 'CreateUserDto[email=$email, memoriesEnabled=$memoriesEnabled, name=$name, password=$password, quotaSizeInBytes=$quotaSizeInBytes, storageLabel=$storageLabel]';
String toString() => 'CreateUserDto[email=$email, memoriesEnabled=$memoriesEnabled, name=$name, password=$password, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -76,6 +87,11 @@ class CreateUserDto {
} else {
// json[r'quotaSizeInBytes'] = null;
}
if (this.shouldChangePassword != null) {
json[r'shouldChangePassword'] = this.shouldChangePassword;
} else {
// json[r'shouldChangePassword'] = null;
}
if (this.storageLabel != null) {
json[r'storageLabel'] = this.storageLabel;
} else {
@@ -97,6 +113,7 @@ class CreateUserDto {
name: mapValueOfType<String>(json, r'name')!,
password: mapValueOfType<String>(json, r'password')!,
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword'),
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
);
}