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

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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Notes and fixed message
beltranaceves committed Jul 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 1e414cf00db4e37fe7ed6edd7a1601329c3e2211
2 changes: 1 addition & 1 deletion lib/nerves_hub_web/controllers/account_controller.ex
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ defmodule NervesHubWeb.AccountController do
:info,
"You have " <>
(length(invites) |> Integer.to_string()) <>
" pending invite" <> if(length(invites) > 1, do: "s", else: "") <> "."
" pending invite" <> if(length(invites) > 1, do: "s", else: "") <> " to organizations."
)
end

2 changes: 1 addition & 1 deletion lib/nerves_hub_web/controllers/org_controller.ex
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ defmodule NervesHubWeb.OrgController do
|> put_flash(:info, "User has been invited")
|> redirect(to: Routes.org_user_path(conn, :index, conn.assigns.org.name))

{:ok, %OrgUser{}} ->
{:ok, %OrgUser{}} -> # TODO: (Beltran) review this case statement and delete unused matches
SwooshEmail.org_user_created(invite_params["email"], org)
|> SwooshMailer.deliver()