Commit 5c478d2d1a9593f9d1720ea052fa1b4cab77ce93

Authored by Victor Costa
1 parent 67bb1469

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
... ...