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

auth/basic: add createBasicAuth and updateBasicAuth for managing Basic credentials via GraphQL #3062

Merged
merged 6 commits into from
Jun 2, 2023

Conversation

allending313
Copy link
Contributor

@allending313 allending313 commented Jun 1, 2023

  • Identified the issue which this PR solves.
  • Read the CONTRIBUTING document.
  • Code builds clean without any errors or warnings.
  • Added appropriate tests for any new functionality.
  • All new and existing tests passed.
  • Added comments in the code, where necessary.
  • Ran make check to catch common errors. Fixed any that came up.

Description:
Created two new mutations: createBasicAuth and updateBasicAuth in order to properly handle cases where basic auth is disabled or with accounts created via OICD/GITHUB and admins wish to create/update a user's basic auth.

Additional checks for auth/basic/db.go methods to fail fast if basic auth is disabled.

Added backend check to ensure that OldPassword is passed for non-admins and for the currentUser.

Which issue(s) this PR fixes:
part of #2667 prereq for #2991

Describe any introduced API changes:
Created two graphql mutation endpoints for create/update basic auth

@allending313 allending313 self-assigned this Jun 1, 2023
@mastercactapus mastercactapus changed the base branch from feat/2667-reset-password to master June 1, 2023 22:51
@allending313 allending313 requested a review from Forfold June 1, 2023 22:55
@mastercactapus mastercactapus changed the title feat: Update password reset api with create/update basic auth mutations auth/basic: add createBasicAuth and updateBasicAuth for managing Basic credentials via GraphQL Jun 1, 2023
Copy link
Collaborator

@tony-tvu tony-tvu left a comment

Choose a reason for hiding this comment

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

LGTM!

@mastercactapus mastercactapus merged commit 3fed575 into master Jun 2, 2023
@mastercactapus mastercactapus deleted the basic-auth-api branch June 2, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants