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

Use default odk creds when organisation do not have their own during project creation #2070

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

Sujanadh
Copy link
Collaborator

@Sujanadh Sujanadh commented Jan 9, 2025

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation
  • πŸ§‘β€πŸ’» Refactor
  • βœ… Test
  • πŸ€– Build or CI
  • ❓ Other (please specify)

Related Issue

Describe this PR

If the organisation used during project creation do not have their own odk credentials, then we allow them to create project with our own default odk credentials without exposing it.

  • checks if org has their own credentials, if not use default creds from env.

Screenshots

N/A

Alternative Approaches Considered

Tried using credentials from hotosm organisation, but thought to use them from env instead to avoid extra db call.

Review Guide

  • create new organisation without odk creds and use it during project creation.

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

@Sujanadh Sujanadh requested a review from spwoodcock January 9, 2025 06:09
@Sujanadh Sujanadh self-assigned this Jan 9, 2025
@github-actions github-actions bot added enhancement New feature or request backend Related to backend code labels Jan 9, 2025
@Sujanadh Sujanadh marked this pull request as draft January 9, 2025 07:02
@Sujanadh
Copy link
Collaborator Author

Sujanadh commented Jan 9, 2025

Frontend changes

  • As default, there will be option to tick the check box to use default odk creds
    image
  • if the org already has odk creds, the check box is ticked automatically here
    image
  • Naxa org here do not have creds, still can use default creds by checking the box
    image

@Sujanadh Sujanadh marked this pull request as ready for review January 9, 2025 09:32
@Sujanadh Sujanadh requested a review from NSUWAL123 January 9, 2025 09:32
Copy link
Member

@spwoodcock spwoodcock left a comment

Choose a reason for hiding this comment

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

Looks good πŸ‘

I thought we would go the route of inserting the default creds into the org during org creation, if none provided.

This approach also works. It actually has the advantage that we can update the default creds in the env at any point

@spwoodcock spwoodcock merged commit 233a9cc into development Jan 9, 2025
9 checks passed
@spwoodcock spwoodcock deleted the feat/use-default-odk-creds branch January 9, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code enhancement New feature or request frontend Related to frontend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants