docbrown/app/policies/buffer_update_policy.rb
Ben Halpern 158f56bc9d
Add page for users to "manage" their posts after publication (distribution, etc.) (#2627)
* Set up basic /manage route

* Add basic article manage page

* Add tips and finalize permissions for /manage

* Add final test and add manage button to article show

* Update failing specs
2019-05-01 09:00:09 -04:00

11 lines
179 B
Ruby

class BufferUpdatePolicy < ApplicationPolicy
def create?
user_is_trusted? || user_is_author?
end
private
def user_is_author?
record.user_id == user.id
end
end