Commit c05eb777fc994bf818e730154968839134ed9e85
1 parent
e44cab7f
Exists in
master
and in
29 other branches
spread-functionality: fixes permissions
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/controllers/my_profile/cms_controller.rb
... | ... | @@ -27,7 +27,7 @@ class CmsController < MyProfileController |
27 | 27 | (user && (user.has_permission?('post_content', profile) || user.has_permission?('publish_content', profile))) |
28 | 28 | end |
29 | 29 | |
30 | - protect_if :except => [:suggest_an_article, :set_home_page, :edit, :destroy, :publish, :upload_files, :new] do |c, user, profile| | |
30 | + protect_if :except => [:suggest_an_article, :set_home_page, :edit, :destroy, :publish, :publish_on_portal_community, :publish_on_communities, :search_communities_to_publish, :upload_files, :new] do |c, user, profile| | |
31 | 31 | user && (user.has_permission?('post_content', profile) || user.has_permission?('publish_content', profile)) |
32 | 32 | end |
33 | 33 | |
... | ... | @@ -37,7 +37,7 @@ class CmsController < MyProfileController |
37 | 37 | (user && (user.has_permission?('post_content', profile) || user.has_permission?('publish_content', profile))) |
38 | 38 | end |
39 | 39 | |
40 | - protect_if :only => [:destroy, :publish] do |c, user, profile| | |
40 | + protect_if :only => :destroy do |c, user, profile| | |
41 | 41 | profile.articles.find(c.params[:id]).allow_post_content?(user) |
42 | 42 | end |
43 | 43 | ... | ... |