mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Fixing enforced user loading. Fixes #677
This commit is contained in:
parent
c39c1d7d99
commit
3e6bb7bff7
@ -56,6 +56,9 @@ const isTesting = ['afterEach', 'after', 'beforeEach', 'before', 'describe', 'it
|
||||
uc.encrypted = !!uc.encryptedPassword;
|
||||
changed = true;
|
||||
}
|
||||
if (!uc.encrypted && !uc.password) {
|
||||
throw new Error('Password error for enforced user: ' + uc.name);
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
config.saveSync();
|
||||
|
@ -183,7 +183,6 @@ export class UserConfig {
|
||||
|
||||
@ConfigProperty<string, ServerConfig, TAGS>({
|
||||
type: 'string',
|
||||
constraint: {assert: (val: string, config) => !!val, assertReason: 'Password cant be empty'},
|
||||
tags:
|
||||
{
|
||||
name: $localize`Password`,
|
||||
@ -193,6 +192,7 @@ export class UserConfig {
|
||||
description: $localize`Unencrypted, temporary password. App will encrypt it and delete this.`
|
||||
})
|
||||
password: string;
|
||||
|
||||
@ConfigProperty({
|
||||
tags:
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user