diff --git a/app/views/super_admins/agents/show.html.slim b/app/views/super_admins/agents/show.html.slim index 45dfee7512..5d483bc129 100644 --- a/app/views/super_admins/agents/show.html.slim +++ b/app/views/super_admins/agents/show.html.slim @@ -7,7 +7,7 @@ header.main-content__header role="banner" => link_to "Inviter", invite_super_admins_agent_path(page.resource), method: :post, class: "button" - if sign_in_as_allowed? => link_to "Se logger en tant que", sign_in_as_super_admins_agent_path(page.resource), class: "button" - => link_to(t("administrate.actions.edit_resource", name: page.page_title), [:edit, namespace, page.resource], class: "button") if valid_action?(:edit) && show_action?(:edit, page.resource) + => link_to(t("administrate.actions.edit_resource", name: page.page_title), [:edit, namespace, page.resource], class: "button") if accessible_action?(page.resource, :edit) => link_to("Migrer", new_super_admins_agent_migration_path(agent_id: page.resource.id), class: "button") section.main-content__body dl diff --git a/app/views/super_admins/application/show.html.erb b/app/views/super_admins/application/show.html.erb index ac810e65fc..0112caab20 100644 --- a/app/views/super_admins/application/show.html.erb +++ b/app/views/super_admins/application/show.html.erb @@ -10,7 +10,7 @@ t("administrate.actions.edit_resource", name: page.page_title), [:edit, namespace, page.resource], class: "button", - ) if valid_action?(:edit) && show_action?(:edit, page.resource) %> + ) if accessible_action?(page.resource, :edit) %> diff --git a/app/views/super_admins/users/show.html.slim b/app/views/super_admins/users/show.html.slim index 2563b0a833..64d25fba7e 100644 --- a/app/views/super_admins/users/show.html.slim +++ b/app/views/super_admins/users/show.html.slim @@ -5,7 +5,7 @@ header.main-content__header role="banner" div - if sign_in_as_allowed? => link_to "Se logger en tant que", sign_in_as_super_admins_user_path(page.resource), class: "button" - => link_to(t("administrate.actions.edit_resource", name: page.page_title),[:edit, namespace, page.resource], class: "button") if valid_action?(:edit) && show_action?(:edit, page.resource) + => link_to(t("administrate.actions.edit_resource", name: page.page_title),[:edit, namespace, page.resource], class: "button") if accessible_action?(page.resource, :edit) section.main-content__body dl - page.attributes.each do |attribute|