Remove unneeded lines restricting permissions
In the past, users had permission to edit their own legislation
proposals. However, that changed in commit ebfa3fb01, where we replaced
the `can` method with `cannot`.
An easier way to remove this permission is to simply remove the whole
statement, since by default users don't have permissions to do anything.
We're also adding a test checking users can't edit their own legislation
proposals, since it was missing.
This commit is contained in:
@@ -39,9 +39,6 @@ module Abilities
|
||||
can [:retire_form, :retire], Proposal, author_id: user.id
|
||||
|
||||
can :read, Legislation::Proposal
|
||||
cannot [:edit, :update], Legislation::Proposal do |proposal|
|
||||
proposal.editable_by?(user)
|
||||
end
|
||||
can [:retire_form, :retire], Legislation::Proposal, author_id: user.id
|
||||
|
||||
can :create, Comment
|
||||
|
||||
Reference in New Issue
Block a user