Skip to content

Commit 2975d1b

Browse files
committedDec 12, 2023
Remove check for full name
1 parent 3df1b0e commit 2975d1b

File tree

4 files changed

+2
-29
lines changed

4 files changed

+2
-29
lines changed
 

‎desktop/src/app/components/messages/m.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class M extends MD { // = Messages Dictionary. For reasons of brevity of
2929
public static SETTINGS_SUCCESS = 'settings.success';
3030
public static SETTINGS_ERROR_MALFORMED_ADDRESS = 'settings.error.malformedAddress';
3131
public static SETTINGS_ERROR_MISSING_USERNAME = 'settings.error.missingUsername';
32-
public static SETTINGS_ERROR_INVALID_USERNAME = 'settings.error.invalidUsername';
3332

3433
// Projects Package
3534
public static PROJECTS_DELETE_SUCCESS = 'projects.deleteSuccess';
@@ -323,16 +322,7 @@ export class M extends MD { // = Messages Dictionary. For reasons of brevity of
323322
this.msgs[M.SETTINGS_ERROR_MISSING_USERNAME] = {
324323
content: i18n({
325324
id: 'messages.settings.error.missingUsername',
326-
value: 'Bitte geben Sie Ihren Vor- und Nachnamen im Feld "Name des Bearbeiters/der Bearbeiterin" ein.'
327-
}),
328-
level: 'danger',
329-
params: [],
330-
hidden: false
331-
};
332-
this.msgs[M.SETTINGS_ERROR_INVALID_USERNAME] = {
333-
content: i18n({
334-
id: 'messages.settings.error.invalidUsername',
335-
value: 'Bitte geben Sie Ihren Vor- und Nachnamen ein.'
325+
value: 'Bitte geben Sie Ihren Namen im Feld "Name des Bearbeiters/der Bearbeiterin" ein.'
336326
}),
337327
level: 'danger',
338328
params: [],

‎desktop/src/app/components/settings/update-username-modal.component.ts

-4
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ export class UpdateUsernameModalComponent {
5252

5353
if (!this.isUsernameSet()) return;
5454

55-
if (!Settings.validateUsername(this.username)) {
56-
return this.messages.add([M.SETTINGS_ERROR_INVALID_USERNAME]);
57-
}
58-
5955
const settings: Settings = this.settingsProvider.getSettings();
6056
settings.username = this.username;
6157

‎desktop/src/app/services/settings/settings-service.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class SettingsService {
7373
*/
7474
public async updateSettings(newSettings: Settings, validate: validationMode = 'none'): Promise<Settings> {
7575

76-
if (validate === 'settings' && !SettingsService.validateUsername(newSettings)) {
76+
if (validate === 'settings' && !Settings.hasUsername(newSettings)) {
7777
throw SettingsErrors.MISSING_USERNAME;
7878
}
7979

@@ -312,11 +312,4 @@ export class SettingsService {
312312
? true
313313
: validateUrl(address);
314314
}
315-
316-
317-
private static validateUsername(settings: Settings): boolean {
318-
319-
return Settings.hasUsername(settings)
320-
&& Settings.validateUsername(settings.username);
321-
}
322315
}

‎desktop/src/app/services/settings/settings.ts

-6
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,4 @@ export module Settings {
5151
&& username.trim().length > 0
5252
&& username !== 'anonymous';
5353
}
54-
55-
56-
export function validateUsername(username: string): boolean {
57-
58-
return username.trim().split(' ').length > 1;
59-
}
6054
}

0 commit comments

Comments
 (0)
Please sign in to comment.