Commit 5a875c906ab8b8393840aafcaa98800ca99e3be6
Committed by
Rodrigo Souto
1 parent
20b57b8d
Exists in
master
and in
29 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 | ... | ... |