Refactor credential management by removing deprecated functions#842
Open
Refactor credential management by removing deprecated functions#842
Conversation
|
johanlundberg
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Remove deprecated VCCS credential management functions
This PR removes two deprecated functions from the VCCS authentication module and fixes a bug in account termination.
Changes
Removed deprecated functions
add_credentials- Dead code with no usages, replaced by more specific functions (add_password,reset_password,change_password)revoke_all_credentials- Migrated single call site to userevoke_passwordsBug fix in account termination
The deprecated
revoke_all_credentialsfunction had a critical bug: it revoked passwords in VCCS but did not remove them from the user object before saving to the database. This created an inconsistency where:user.credentialsThe replacement function
revoke_passwordsproperly removes credentials from the user object, ensuring consistency between VCCS and the database.Updated call site
security/views/security.py- Account termination now usesrevoke_passwordswith explicit parameters:reason="account termination"application="security"Code reduction
@deprecateddecoratorTesting
test_account_terminatedpasses