mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Added mechanism of required password change of new user's first login (#272)
* Deprecate login scenarios that support pre-web era * refactor and simplify setup * Added user info to change password form * change isFistLogin column to shouldChangePassword * Implemented change user password * Implement the change password page for mobile * Change label * Added changes log and up minor version * Fixed typo in the release note * Up server version
This commit is contained in:
@@ -27,7 +27,7 @@ export class UserEntity {
|
||||
profileImagePath!: string;
|
||||
|
||||
@Column()
|
||||
isFirstLoggedIn!: boolean;
|
||||
shouldChangePassword!: boolean;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: string;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class RenameIsFirstLoggedInColumn1656338626260 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE users
|
||||
RENAME COLUMN "isFirstLoggedIn" to "shouldChangePassword";
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE users
|
||||
RENAME COLUMN "shouldChangePassword" to "isFirstLoggedIn";
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user