Class: CarrierTypePolicy
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- CarrierTypePolicy
- Defined in:
- app/policies/carrier_type_policy.rb
Instance Method Summary collapse
Instance Method Details
#create? ⇒ Boolean
10 11 12 |
# File 'app/policies/carrier_type_policy.rb', line 10 def create? true if user.try(:has_role?, 'Administrator') end |
#destroy? ⇒ Boolean
18 19 20 21 22 |
# File 'app/policies/carrier_type_policy.rb', line 18 def destroy? if user.try(:has_role?, 'Administrator') true unless record.manifestations.exists? end end |
#index? ⇒ Boolean
2 3 4 |
# File 'app/policies/carrier_type_policy.rb', line 2 def index? true if user.try(:has_role?, 'Librarian') end |
#show? ⇒ Boolean
6 7 8 |
# File 'app/policies/carrier_type_policy.rb', line 6 def show? true if user.try(:has_role?, 'Librarian') end |
#update? ⇒ Boolean
14 15 16 |
# File 'app/policies/carrier_type_policy.rb', line 14 def update? true if user.try(:has_role?, 'Administrator') end |