Skip to content

Commit

Permalink
fix(emailaliascontroller): check that user owns alias
Browse files Browse the repository at this point in the history
  • Loading branch information
xmok committed Jul 8, 2024
1 parent 6bc0e96 commit b9cafbc
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ defmodule ShroudWeb.Api.V1.EmailAliasController do
alias =
EmailAlias
|> where([ea], is_nil(ea.deleted_at))
|> where([ea], ea.user_id == ^conn.assigns.current_user.id)
|> Repo.get_by(address: address)

if is_nil(alias) do
Expand Down

0 comments on commit b9cafbc

Please sign in to comment.