nerves-hub / nerves_hub_web

Manage firmware updates for Nerves devices
https://nerves-hub.org/
Apache License 2.0
184 stars 69 forks source link

Invites to join an Org require the user to accept the invite #1346

Open beltranaceves opened 3 months ago

beltranaceves commented 3 months ago

Addressing #1337.

Hi, first time contributing to this repo. I wanted to validate the changes and style before writing tests.

Checklist:

  1. [x] When inviting existing users, they are not automatically added to the org until they accept the invite.
  2. [x] Invites for existing users cannot be accepted if the user is not logged in.
  3. [x] Invites for existing users cannot be accepted if the logged in user is not the recipient.
  4. [x] Invites for new users cannot be accepted if a user is logged in.
  5. [x] Show pending invites on login.
  6. [ ] Invites list view.
  7. [ ] Cleaned up temp changes.
  8. [ ] Broken test are fixed.
  9. [ ] New test have been writen.
beltranaceves commented 3 months ago

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