From af760908ef6029a1aa8bf1c538e0ec5afe1c0081 Mon Sep 17 00:00:00 2001 From: pabois <pierreandre.boissinot@noesya.coop> Date: Thu, 24 Feb 2022 15:38:26 +0100 Subject: [PATCH] ajustements abilities --- app/models/ability.rb | 2 +- app/views/admin/communication/website/categories/show.html.erb | 2 +- app/views/admin/communication/website/pages/show.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 21780d859..6c56c6ec5 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -58,7 +58,7 @@ class Ability can :manage, Communication::Website::Page, university_id: @user.university_id can :manage, Communication::Website::Post, university_id: @user.university_id can :manage, Communication::Website::Category, university_id: @user.university_id - can :manage, Communication::Website::Block, university_id: @user.university_id + can :manage, Communication::Block, university_id: @user.university_id can [:read, :update, :reorder], Communication::Website::Menu, university_id: @user.university_id can :manage, Communication::Website::Menu::Item, university_id: @user.university_id can :manage, Communication::Website::Imported::Website, university_id: @user.university_id diff --git a/app/views/admin/communication/website/categories/show.html.erb b/app/views/admin/communication/website/categories/show.html.erb index d93cde457..6b2cd0980 100644 --- a/app/views/admin/communication/website/categories/show.html.erb +++ b/app/views/admin/communication/website/categories/show.html.erb @@ -73,7 +73,7 @@ <% content_for :action_bar_left do %> <%= link_to t('static'), static_admin_communication_website_category_path(@category), - class: button_classes('btn-light') if can? :static, @category %> + class: button_classes('btn-light') if current_user.server_admin? %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/communication/website/pages/show.html.erb b/app/views/admin/communication/website/pages/show.html.erb index eb1059a31..1372fc479 100644 --- a/app/views/admin/communication/website/pages/show.html.erb +++ b/app/views/admin/communication/website/pages/show.html.erb @@ -90,7 +90,7 @@ <% content_for :action_bar_left do %> <%= link_to t('static'), static_admin_communication_website_page_path(@page), - class: button_classes('btn-light') if can? :static, @page %> + class: button_classes('btn-light') if current_user.server_admin? %> <% end %> <% content_for :action_bar_right do %> -- GitLab