Commit 4e9cbfd2168dd28e49f6f6644b09e4f7a9d518ca
Committed by
Rodrigo Souto
1 parent
a080e669
Exists in
api_tasks
and in
4 other branches
api: fix permission check for article creation
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero/api/v1/articles.rb
... | ... | @@ -53,7 +53,7 @@ module Noosfero |
53 | 53 | post ':id/children' do |
54 | 54 | |
55 | 55 | parent_article = environment.articles.find(params[:id]) |
56 | - return forbidden! unless current_person.can_post_content?(parent_article.profile) | |
56 | + return forbidden! unless parent_article.allow_create?(current_person) | |
57 | 57 | |
58 | 58 | klass_type= params[:content_type].nil? ? 'TinyMceArticle' : params[:content_type] |
59 | 59 | #FIXME see how to check the article types | ... | ... |