1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

fix access to /admin/invoices for managers

This commit is contained in:
Sylvain 2020-06-15 16:56:43 +02:00
parent be9ee9d25d
commit b790bc01e7
2 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,6 @@
# Check the access policies for API::PaymentsController
class PaymentPolicy < ApplicationPolicy
def online_payment_status?
user.admin?
user.admin? || user.manager?
end
end

View File

@ -24,7 +24,7 @@ class SettingPolicy < ApplicationPolicy
end
def test_present?
user&.admin? || SettingPolicy.public_whitelist.push('openlab_app_secret').include?(record.name)
user&.admin? || SettingPolicy.public_whitelist.concat(%w[openlab_app_secret stripe_secret_key]).include?(record.name)
end
##