build and render secured URL to invite admin

For clarity and a better understanding, use a dedicated controller to
build and render the confirmation URL to share in order to add a new
administrateur.
This commit is contained in:
sebastiencarceles 2022-09-09 11:45:14 +02:00
parent ca707d2880
commit 4123709e72
6 changed files with 144 additions and 5 deletions

View file

@ -12,7 +12,7 @@ as defined by the routes in the `admin/` namespace
<hr />
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
<% Administrate::Namespace.new(namespace).resources.select { |resource| resource.to_s != "confirmation_urls" }.each do |resource| %>
<%= link_to(
display_resource_name(resource),

View file

@ -0,0 +1,22 @@
<% content_for(:title) { "Ajout d'un administrateur" } %>
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
</header>
<section class="main-content__body">
<p>
Veuillez partager ce lien avec un autre super admin pour que l'opération soit effectuée.
</p>
<dl>
<dt class="attribute-label">
Lien
</dt>
<dd class="attribute-data">
<%= @url %>
</dd>
</dl>
</section>