Invites to join an Org require the user to accept the invite#1346
Draft
beltranaceves wants to merge 18 commits into
Draft
Invites to join an Org require the user to accept the invite#1346beltranaceves wants to merge 18 commits into
beltranaceves wants to merge 18 commits into
Conversation
Author
|
I was tempted to add a route for logged in users that lists pending received invites, accessible from the user dropdown menu. But it seems that issues and PRs are fairly atomic, so I kept it pretty barebones |
joshk
requested changes
Jun 23, 2024
joshk
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for jumping into this issue! Its great to have new people onboard.
You are on the right track. I have a few suggestions which should clear up the UX of the feature:
- My suggestion would be to have a new banner in the Orgs list (
/) with a message like "You have x pending invites to Organizations". - When you click the message, or link by the message ("View pending invites"), you would then be taken to a page which lists all pending invites.
- This list would include the Organization name, who invited you (I have this in another PR which I'm just finishing), when they invited you, and two buttons, accept and decline.
Let me know if there is anything I can help with.
Comment on lines
+445
to
+450
| {:error, :not_found} -> invite(params, org) | ||
| {:ok, user} -> add_org_user(org, user, %{role: params["role"]}) | ||
| {:error, :not_found} -> | ||
| invite(params, org) | ||
|
|
||
| {:ok, _user} -> | ||
| invite(params, org) | ||
| # add_org_user(org, user, %{role: params["role"]}) |
Collaborator
There was a problem hiding this comment.
I guess this can be simplified to always invite, and not having to search for the user
|
|
||
| get("/invite/:token", AccountController, :invite) | ||
| post("/invite/:token", AccountController, :accept_invite) | ||
| post("/invite_existing/:token", AccountController, :accept_invite_existing) |
Collaborator
There was a problem hiding this comment.
this should all be possible without another route.
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.
Addressing #1337.
Hi, first time contributing to this repo. I wanted to validate the changes and style before writing tests.
Checklist: