1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/policies/private_key_policy.rb

12 lines
257 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2019-09-13 15:05:02 -04:00
class PrivateKeyPolicy < ApplicationPolicy
def show?
return false if account.nil?
(account.superuser? || account == record.account) &&
record.exist? &&
2019-09-11 22:37:36 -04:00
params[:private_key_pem_secret].present?
end
end