Skip to content

Commit

Permalink
Allow :create Entry only for publishers on accounts, not on entries
Browse files Browse the repository at this point in the history
  • Loading branch information
aviav committed Aug 13, 2017
1 parent 3d34806 commit 0c7019b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/policies/pageflow/entry_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def publish?
end

def create?
publish? && AccountPolicy::Scope.new(user, Account).entry_creatable.any?
query.has_at_least_account_role?(:publisher) &&
AccountPolicy::Scope.new(user, Account).entry_creatable.any?
end

def duplicate?
Expand Down

0 comments on commit 0c7019b

Please sign in to comment.