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

Better hide reset password functionality for LDAP users #16091

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

snipe
Copy link
Owner

@snipe snipe commented Jan 17, 2025

We were already disallowing LDAP users to save new passwords, but there were a few places where we didn't hide the buttons. (It would redirect with error on save, and didn't actually save the password, but it was a clunkier user experience.

This now does a better job of hiding those elements if the user has ldap_import set to 1 on their account.

TODO: We should probably come up with a better way of explaining what ldap_import actually does in the modern world. Really, it just determines whether or not the user can edit their password, and we could probably do a better job of explaining that instead of the old "LDAP Enabled" text. In fact, perhaps change the actual fieldname to reflect what this actually does.

Copy link

what-the-diff bot commented Jan 17, 2025

PR Summary

  • Improved Password Reset Process
    The process of resetting passwords has been updated to account for users who have their details imported using LDAP. Users that fall into this category will now be appropriately handled by the system.

  • Updates to Profile Controller
    The ProfileController's password method has undergone modification. Now, it redirects LDAP imported users accompanied by an error message if they attempt a password change, reinforcing our new password policy.

  • Bulk Password Reset Functionality Enhancement
    The bulk password reset feature in the BulkUsersController also got an upgrade to exclude LDAP users from its purview. This is to ensure these users don't undergo unexpected password resets.

  • Language Entries Addition in general.php
    There are new language entries in general.php that are related to user-managed passwords. This addition was made to address localisation and better communication with the users.

  • Conditional Rendering in Account View
    The "Change Password" button will now be conditionally displayed in the account view files depending on the user status — it won't show up for LDAP users. This includes better user interface handling and subsequent advantages in overall user experience.

  • Updated References in bulk-edit.blade.php
    Changes were implemented in the bulk-edit.blade.php file that involved updating the references to use the new language keys for LDAP related settings. These linguistic updates bring about better accuracy and improved comprehension for users regarding LDAP settings.

@snipe snipe merged commit 327491c into develop Jan 17, 2025
8 of 9 checks passed
@snipe snipe deleted the hide_password_reset_if_ldap branch January 17, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant