Login Unsuccessful
+You do not have permission to access this system.
+ Click here to return to login +diff --git a/apps/andi/assets/css/app.scss b/apps/andi/assets/css/app.scss index 596d1c71c..0ffd070fc 100644 --- a/apps/andi/assets/css/app.scss +++ b/apps/andi/assets/css/app.scss @@ -152,6 +152,7 @@ body { } @import "./access-groups.scss"; +@import "./autherror.scss"; @import "./button.scss"; @import "./data_dictionary_form.scss"; @import "./datasets.scss"; diff --git a/apps/andi/assets/css/autherror.scss b/apps/andi/assets/css/autherror.scss new file mode 100644 index 000000000..57a4c1fda --- /dev/null +++ b/apps/andi/assets/css/autherror.scss @@ -0,0 +1,19 @@ +.autherror-view { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: rgb(88, 95, 99); + height: 100vh; + width: 100vw; +} + +.autherror-inner-content { + background: $color-content-background; + box-shadow: $box-shadow; + height: max-content; + width: max-content; + margin: 1em; + padding: 2em; + border-radius: 6px; +} \ No newline at end of file diff --git a/apps/andi/lib/andi_web/controllers/auth_controller.ex b/apps/andi/lib/andi_web/controllers/auth_controller.ex index 7f6e86a71..d4569ec40 100644 --- a/apps/andi/lib/andi_web/controllers/auth_controller.ex +++ b/apps/andi/lib/andi_web/controllers/auth_controller.ex @@ -21,7 +21,7 @@ defmodule AndiWeb.AuthController do Logger.error("Failed to retrieve auth credentials: #{inspect(fails)} with params #{inspect(params)}") conn - |> redirect(to: "/") + |> redirect(to: "/autherror") end def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _params) do diff --git a/apps/andi/lib/andi_web/live/error_live_view/error_live_view.ex b/apps/andi/lib/andi_web/live/error_live_view/error_live_view.ex new file mode 100644 index 000000000..25feb0cab --- /dev/null +++ b/apps/andi/lib/andi_web/live/error_live_view/error_live_view.ex @@ -0,0 +1,23 @@ +defmodule AndiWeb.ErrorLiveView do + use AndiWeb, :live_view + + access_levels(render: [:public, :private]) + + def render(assigns) do + ~L""" +
You do not have permission to access this system.
+ Click here to return to login +