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

Implement user invitation functionality for projects via OSM messages #2019

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

Anuj-Gupta4
Copy link
Collaborator

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

Added an endpoint that will take a project id and username, check if an osm user with such username exists and then sends them an invite with a link to the project.

Checklist before requesting a review

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

@Anuj-Gupta4 Anuj-Gupta4 requested a review from Sujanadh December 23, 2024 09:47
@github-actions github-actions bot added enhancement New feature or request backend Related to backend code labels Dec 23, 2024
@github-actions github-actions bot added the docs Improvements or additions to documentation label Dec 23, 2024
@Anuj-Gupta4 Anuj-Gupta4 self-assigned this Dec 23, 2024
@Anuj-Gupta4 Anuj-Gupta4 changed the title feat: implement user invitation functionality for projects via OSM messages Implement user invitation functionality for projects via OSM messages Dec 25, 2024
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.

Perfect πŸ‘

What I'm thinking for the future to make this flow better for the org admin invite too:

  • A new db table for invites, including invite tokens, and selected permissions
  • We have a new endpoint to accept invites
  • We create tokens (with an expiry) to access this endpoint
  • The OSM endpoint includes a link that calls this API (which includes the token)
  • Calling the endpoint with the specific token first logs in the user, so the db has an entry for them
  • Then we add the specified user roles to the db too (org or project permissions)

Open to other ideas though!

@Anuj-Gupta4
Copy link
Collaborator Author

This sounds like a great idea.

@Sujanadh Sujanadh merged commit 3c15671 into hotosm:development Dec 30, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code docs Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants