Skip to content
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

Do not allow passwords to be expired for non-local users #31

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

phil-davis
Copy link
Contributor

Fixes issue #30

@phil-davis phil-davis added bug Something isn't working 3 - To Review labels Jul 10, 2018
@phil-davis phil-davis self-assigned this Jul 10, 2018
@phil-davis phil-davis requested review from PVince81 and butonic July 10, 2018 04:35
@phil-davis phil-davis force-pushed the no-expire-password-for-LDAP-users branch from f9e01b8 to 33538cc Compare July 10, 2018 09:22
@codecov-io
Copy link

codecov-io commented Jul 10, 2018

Codecov Report

Merging #31 into master will increase coverage by 0.18%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #31      +/-   ##
============================================
+ Coverage     64.37%   64.55%   +0.18%     
- Complexity      124      125       +1     
============================================
  Files            22       22              
  Lines           581      584       +3     
============================================
+ Hits            374      377       +3     
  Misses          207      207
Impacted Files Coverage Δ Complexity Δ
lib/Command/ExpirePassword.php 100% <100%> (ø) 6 <0> (+1) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b43e4ae...6372ab3. Read the comment docs.

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 see optional comment

@@ -88,6 +90,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {
return 67;
}

if (!$user->canChangePassword()) {
$output->writeln("<error>Passwords cannot be expired for user: $uid</error>");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add a reason: because the user is in a backend that doesn't support password change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not.
I mentioned this sort of thing in #29 (comment) (item 2 at the bottom of the post). In core, it would be nice to make some more friendly messages when password change is attempted for these type of users.

@phil-davis phil-davis force-pushed the no-expire-password-for-LDAP-users branch from 33538cc to 6372ab3 Compare July 10, 2018 10:29
@phil-davis
Copy link
Contributor Author

Optional comment addressed. "cannot be expired" message expanded.

@PVince81 PVince81 added this to the development milestone Jul 10, 2018
@phil-davis phil-davis merged commit b8ef931 into master Jul 10, 2018
@phil-davis phil-davis deleted the no-expire-password-for-LDAP-users branch July 10, 2018 10:53
@PVince81 PVince81 modified the milestones: development, qa Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - To Review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants