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
+1
View File
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
**name** | **String** | |
**password** | **String** | |
**quotaSizeInBytes** | **int** | | [optional]
**shouldChangePassword** | **bool** | | [optional]
**storageLabel** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+18 -1
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'),
);
}
+5
View File
@@ -41,6 +41,11 @@ void main() {
// TODO
});
// bool shouldChangePassword
test('to test the property `shouldChangePassword`', () async {
// TODO
});
// String storageLabel
test('to test the property `storageLabel`', () async {
// TODO