rosa-build/app/policies/key_pair_policy.rb

9 lines
179 B
Ruby
Raw Normal View History

class KeyPairPolicy < ApplicationPolicy
def create?
key_pair.repository.blank? || local_admin?(record.repository.platform)
end
alias_method :destroy?, :create?
end