rosa-build/app/policies/key_pair_policy.rb

10 lines
201 B
Ruby
Raw Normal View History

class KeyPairPolicy < ApplicationPolicy
def create?
return false unless record.repository
is_admin? || local_admin?(record.repository.platform)
end
alias_method :destroy?, :create?
end