docbrown/app/policies/rating_vote_policy.rb
Anna Buianova 473594f192
Match spam role with existing suspended actions (#20477)
* Started matching spam and suspended roles

* Match spam and suspended roles in most cases

* Fixed check_suspended for unauthenticated users
2023-12-27 20:12:50 +00:00

9 lines
162 B
Ruby

class RatingVotePolicy < ApplicationPolicy
def create?
!user.spam_or_suspended?
end
def permitted_attributes
%i[rating group article_id]
end
end