-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-30797: Implemented configuration for user password expiration #2742
Conversation
96c6de4
to
7e6d233
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix indentation in PR, like in https://github.com/ezsystems/ezpublish-kernel/pull/2742/files#diff-f9c2a10b2584d464cc2222ef018e880bR109
5896375
to
4ced959
Compare
Done @mikadamczyk |
eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php
Outdated
Show resolved
Hide resolved
'id' => $loadedUser->id, | ||
'login' => $loadedUser->login, | ||
'email' => $userUpdateStruct->email ?: $loadedUser->email, | ||
'isEnabled' => $userUpdateStruct->enabled !== null ? $userUpdateStruct->enabled : $loadedUser->enabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'isEnabled' => $userUpdateStruct->enabled !== null ? $userUpdateStruct->enabled : $loadedUser->enabled, | |
'isEnabled' => $userUpdateStruct->enabled ?? $loadedUser->enabled, |
'login' => $loadedUser->login, | ||
'email' => $userUpdateStruct->email ?: $loadedUser->email, | ||
'isEnabled' => $userUpdateStruct->enabled !== null ? $userUpdateStruct->enabled : $loadedUser->enabled, | ||
'maxLogin' => $userUpdateStruct->maxLogin !== null ? (int)$userUpdateStruct->maxLogin : $loadedUser->maxLogin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'maxLogin' => $userUpdateStruct->maxLogin !== null ? (int)$userUpdateStruct->maxLogin : $loadedUser->maxLogin, | |
'maxLogin' => $userUpdateStruct->maxLogin ?? $loadedUser->maxLogin, | |
``` if we could avoid casting to `int` |
As we discussed, method names in API could be improved and we could get rid of |
eZ/Publish/API/Repository/Tests/FieldType/UserIntegrationTest.php
Outdated
Show resolved
Hide resolved
eZ/Publish/API/Repository/Tests/FieldType/UserIntegrationTest.php
Outdated
Show resolved
Hide resolved
eZ/Publish/Core/MVC/Symfony/FieldType/User/ParameterProvider.php
Outdated
Show resolved
Hide resolved
1e476a3
to
c9135ee
Compare
f79ad21
to
4dc7b7c
Compare
89e6621
to
11baaed
Compare
PR updated according to code review suggestions. |
Rebase is needed here, I suppose. |
7.x
,master
Added new settings to
ezuser
field type:For more details see the specification attached to JIRA issue.
Significant changes in the database schema
password_updated_at
column toez_user
table which stores the timestamp of last password update.Why to store timestamp of password update instead of password expiry date?
Column
password_updated_at
in opposite topassword_expiry_at
doesn't need to be updated after changing password expiry settings.Significant PAPI changes
\eZ\Publish\API\Repository\UserService::getPasswordInfo
methodand
\eZ\Publish\API\Repository\Values\User\PasswordInfo
structure: https://github.com/ezsystems/ezpublish-kernel/pull/2742/files#diff-8a78ba0adc00ac7ed0fe7d268b6b4e84R15-R57\eZ\Publish\API\Repository\Values\User\User::$passwordUpdatedAt
propertyTODO:
$ composer fix-cs
).