1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-26 05:27:35 +02:00

Do not add users if authentication is not required

This commit is contained in:
Patrik J. Braun 2022-02-26 12:45:26 +01:00
parent 6cc171c7f5
commit 950067c789

View File

@ -96,6 +96,9 @@ export class SQLConnection {
public static async init(): Promise<void> {
const connection = await this.getConnection();
if (Config.Client.authenticationRequired !== true) {
return;
}
// Adding enforced users to the db
const userRepository = connection.getRepository(UserEntity);
if (Array.isArray(Config.Server.Database.enforcedUsers) &&