hummingbird-me/kitsu-server

View on GitHub
app/policies/group_ticket_message_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
class GroupTicketMessagePolicy < ApplicationPolicy
  def create?
    policy_for(record.ticket).update?
  end
  alias_method :update?, :create?
  alias_method :destroy?, :create?

  class Scope < Scope
    def resolve
      scope.visible_for(user)
    end
  end
end