diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dfd649d..5164a14 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1296,8 +1296,19 @@ module ApplicationHelper end end + def content_remove_spread(content) + not (profile != user || user.communities.present? || @portal_enabled) + end + def remove_content_button(action) - @plugins.dispatch("content_remove_#{action.to_s}", @page).include?(true) + method_name = "content_remove_#{action.to_s}" + plugin_condition = @plugins.dispatch(method_name, @page).include?(true) + begin + core_condition = self.send(method_name, @page) + rescue NoMethodError + core_condition = false + end + core_condition || plugin_condition end def template_options(kind, field_name) diff --git a/app/views/cms/publish.html.erb b/app/views/cms/publish.html.erb index 2c4e476..82ad473 100644 --- a/app/views/cms/publish.html.erb +++ b/app/views/cms/publish.html.erb @@ -30,56 +30,60 @@ <% end %> -- libgit2 0.21.2