Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/ability/website_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Ability::WebsiteManager < Ability
def initialize(user)
super
manage_blocks
can [:read, :analytics], Communication::Website, university_id: @user.university_id, id: managed_websites_ids
can [:read, :analytics, :synchronize], Communication::Website, university_id: @user.university_id, id: managed_websites_ids
can :manage, Communication::Website::Localization, university_id: @user.university_id, communication_website_id: managed_websites_ids
can :manage, Communication::Website::Alert, university_id: @user.university_id, communication_website_id: managed_websites_ids
can :manage, Communication::Website::Agenda::Event, university_id: @user.university_id, communication_website_id: managed_websites_ids
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/communication/websites/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<%= link_to t('communication.website.golive.button'),
production_admin_communication_website_path(@website),
class: button_classes unless @website.in_production %>
<% if @git_files_desynchronized.any? %>
<% if can?(:synchronize, @website) && @git_files_desynchronized.any? %>
<%= link_to synchronize_admin_communication_website_path(@website), method: :post, class: button_classes do %>
<%= t('admin.communication.website.synchronize.button') %>
<span class="badge rounded-pill border border-subtle text-dark"><%= @git_files_desynchronized.length %></span>
Expand Down
Loading