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

feat: management command allowing you to revoke certificates #2652

Conversation

deborahgu
Copy link
Member

@deborahgu deborahgu commented Dec 4, 2024

Management command to enable batch revocation of certificates. It defaults to program_certificates, which is the most likely use case, but because some UserCredentials might not be synchronized from the LMS, does allow override of the credential type.

  • Adds a new model and django admin so this script can be run in an automated fashion
  • this required bringing in config_models

FIXES: APER-3799

this allows revocation of certificates. It defaults to
program_certificates, which is the most  likely use case, but because
some UserCredentials might not be synchronized from the LMS, does allow
override of the credential type.

* Adds a new model and django admin so this script can be run in an automated fashion
* this required bringing in config_models

FIXES: APER-3799
@deborahgu deborahgu requested a review from a team as a code owner December 4, 2024 22:24
fixing import sorting

FIXES: APER-3799
some improvement to test coverage

FIXES: APER-3799
improved test coverage, and as a side effect, improved the actual code

FIXES: APER-3799
ran isort

FIXES: APER-3799
modifying the comment

FIXES: APER-3799
with self.assertRaisesRegex(CommandError, expected):
call_command(Command(), "--lms_user_ids", "8675309", "--credential_id", "123")

# real user, doesn't mapped to a real credential
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: map over mapped in this comment

@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
Copy link
Contributor

@justinhynes justinhynes Dec 5, 2024

Choose a reason for hiding this comment

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

Has Credentials been upgraded to use Python 3.12? I thought we were still only using 3.11.

Copy link
Member Author

Choose a reason for hiding this comment

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

regenerating with my devstack version of Python, thanks

regenerating with devstack version of Python to make sure I have the
correct version

FIXES: APER-3799
@deborahgu deborahgu enabled auto-merge (squash) December 5, 2024 19:48
@deborahgu deborahgu requested a review from justinhynes December 5, 2024 19:48
@deborahgu deborahgu merged commit 311f38e into master Dec 5, 2024
7 checks passed
@deborahgu deborahgu deleted the dkaplan1/APER-3799_write-a-utility-script/function-to-automate-the-revocation-of-program-certificates branch December 5, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants