mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +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:
parent
2e85e18020
commit
5f00d8b9c6
33 changed files with 738 additions and 562 deletions
|
|
@ -18,14 +18,6 @@
|
|||
error = response.error;
|
||||
}
|
||||
|
||||
if (response.needUpdate) {
|
||||
return dispatch('need-update');
|
||||
}
|
||||
|
||||
if (response.needSelectAdmin) {
|
||||
return dispatch('need-select-admin');
|
||||
}
|
||||
|
||||
if (response.success) {
|
||||
$session.user = {
|
||||
accessToken: response.user!.accessToken,
|
||||
|
|
@ -36,6 +28,10 @@
|
|||
email: response.user!.email,
|
||||
};
|
||||
|
||||
if (!response.user?.isAdmin && response.user?.shouldChangePassword) {
|
||||
return dispatch('first-login');
|
||||
}
|
||||
|
||||
return dispatch('success');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue