hummingbird-me/kitsu-server

View on GitHub
app/policies/community_recommendation_request_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class CommunityRecommendationRequestPolicy < ApplicationPolicy
  administrated_by :community_mod

  def update?
    is_owner? || can_administrate?
  end

  def create?
    record.user == user
  end

  def destroy?
    is_owner? || can_administrate?
  end
end