credo fixes
This commit is contained in:
parent
0abe522582
commit
9c3319050f
5 changed files with 11 additions and 5 deletions
|
|
@ -181,14 +181,14 @@
|
|||
|> String.replace_leading("lib/", "test/")
|
||||
|> String.replace_trailing(".ex", "_test.exs")
|
||||
end
|
||||
]}
|
||||
]},
|
||||
# {Jump.CredoChecks.ForbiddenFunction,
|
||||
# [
|
||||
# functions: [
|
||||
# {:erlang, :binary_to_term, "Use Plug.Crypto.non_executable_binary_to_term/2 instead."}
|
||||
# ]
|
||||
# ]},
|
||||
# {Jump.CredoChecks.LiveViewFormCanBeRehydrated},
|
||||
{Jump.CredoChecks.LiveViewFormCanBeRehydrated}
|
||||
# {Jump.CredoChecks.UndeclaredExternalResource},
|
||||
# {Jump.CredoChecks.PreferChangeOverUpDownMigrations, [start_after: "20250101000000"]},
|
||||
# {Jump.CredoChecks.PreferTextColumns, [start_after: "20250101000000"]},
|
||||
|
|
|
|||
|
|
@ -109,6 +109,10 @@ defmodule ToweropsWeb.AccountLive.TotpEnrollment do
|
|||
|> redirect(to: redirect_path)}
|
||||
end
|
||||
|
||||
def handle_event("validate_code", _params, socket) do
|
||||
{:noreply, socket}
|
||||
end
|
||||
|
||||
defp handle_valid_code(socket, user, secret) do
|
||||
# Create first TOTP device (new multi-device system)
|
||||
case Accounts.create_totp_device(user.id, "Primary Device", secret) do
|
||||
|
|
@ -317,6 +321,8 @@ defmodule ToweropsWeb.AccountLive.TotpEnrollment do
|
|||
<.form
|
||||
for={%{}}
|
||||
as={:form}
|
||||
id="totp-verify-form"
|
||||
phx-change="validate_code"
|
||||
phx-submit="verify_code"
|
||||
class="ml-11 flex flex-col items-center"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ defmodule ToweropsWeb.Admin.AuditLive.Index do
|
|||
|
||||
<!-- Search Filters -->
|
||||
<div class="mt-8 bg-white dark:bg-gray-900 shadow rounded-lg p-6">
|
||||
<form phx-submit="search" class="space-y-4">
|
||||
<form id="audit-search-form" phx-change="search" phx-submit="search" class="space-y-4">
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<div>
|
||||
<label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ defmodule ToweropsWeb.UserRegistrationLive do
|
|||
</div>
|
||||
|
||||
<div class="mt-8">
|
||||
<.form for={@form} phx-change="validate" phx-submit="save">
|
||||
<.form for={@form} id="registration-form" phx-change="validate" phx-submit="save">
|
||||
<%= if @invitation_token do %>
|
||||
<input type="hidden" name="user[invitation_token]" value={@invitation_token} />
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ defmodule ToweropsWeb.UserResetPasswordLive do
|
|||
</div>
|
||||
|
||||
<div class="mt-8">
|
||||
<.form for={@form} phx-change="validate" phx-submit="save">
|
||||
<.form for={@form} id="reset-password-form" phx-change="validate" phx-submit="save">
|
||||
<.input
|
||||
field={@form[:password]}
|
||||
type="password"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue