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

Delete an organisation member #711

Merged
merged 18 commits into from
Jan 6, 2025
Merged

Delete an organisation member #711

merged 18 commits into from
Jan 6, 2025

Conversation

nid90
Copy link
Member

@nid90 nid90 commented Jan 2, 2025

Closes: #278

Duplicate and updated version of #668

samrat added 2 commits January 6, 2025 11:56
If the user is not part of an organization, some sections in the page
title are nil.
@samrat
Copy link
Contributor

samrat commented Jan 6, 2025

I ran into two errors when opening the page as a user who is not part of any organization:

  • page_title was erroring out
  • Organization dropdown in header was failing to render.

I've pushed a commit to fix the two issues.

This is what the "no organizations" page looks like now(title is just "Tramline" and org dropdown hidden):

Screenshot 2025-01-06 at 12 18 25

@samrat samrat marked this pull request as ready for review January 6, 2025 11:17
@samrat
Copy link
Contributor

samrat commented Jan 6, 2025

Made invitations cancellable. When a user visits a discarded invite link they'll see this error:

Screenshot 2025-01-06 at 14 29 16

@nid90
Copy link
Member Author

nid90 commented Jan 6, 2025

@samrat I think we should handle the invalid invite token a little better. There are two places where the invite acceptance flow can go - Authentication::Email::ConfirmationsController for existing users and Authentication::Email::RegistrationsController for new users. We should show proper messages when the invite token is no longer valid.

@samrat
Copy link
Contributor

samrat commented Jan 6, 2025

Improved the error messages.

When unregistered email visits discarded invite link

Screenshot 2025-01-06 at 15 57 04

When registered email visits discarded invite link

  • redirects to root path with a flash message

Screenshot 2025-01-06 at 15 56 39

@samrat samrat force-pushed the feat/delete-org-member branch from 789ee87 to ba1fc23 Compare January 6, 2025 15:02
@nid90
Copy link
Member Author

nid90 commented Jan 6, 2025

@samrat lgtm. merging.

made some minor UI changes. we use EmptyStateComponent for all empty state pages/sections. also, added handling when the invite is not found. as a general rule, we avoid find_by! or find in user-facing actions as that will blow up with a 500 for the user.

@kitallis kitallis self-requested a review January 6, 2025 17:13
@nid90 nid90 force-pushed the feat/delete-org-member branch from f418ba9 to 38edfc5 Compare January 6, 2025 17:14
@nid90 nid90 merged commit 244b45e into main Jan 6, 2025
4 checks passed
@nid90 nid90 deleted the feat/delete-org-member branch January 6, 2025 17:17
@kitallis kitallis restored the feat/delete-org-member branch January 6, 2025 17:22
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.

Orgs should be able to remove team members
3 participants