Module: Katello::Authorization::Organization
- Extended by:
- ActiveSupport::Concern
- Includes:
- Authorizable
- Defined in:
- app/models/katello/authorization/organization.rb
Instance Method Summary collapse
- #editable? ⇒ Boolean
- #manifest_importable? ⇒ Boolean
- #permissible_promotion_paths(permissible_environments) ⇒ Object
- #promotable_promotion_paths ⇒ Object
- #readable_promotion_paths ⇒ Object
- #subscriptions_readable? ⇒ Boolean
Instance Method Details
#editable? ⇒ Boolean
7 8 9 |
# File 'app/models/katello/authorization/organization.rb', line 7 def editable? (:edit_organizations) end |
#manifest_importable? ⇒ Boolean
11 12 13 |
# File 'app/models/katello/authorization/organization.rb', line 11 def manifest_importable? (:import_manifest) end |
#permissible_promotion_paths(permissible_environments) ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/models/katello/authorization/organization.rb', line 23 def permissible_promotion_paths(permissible_environments) promotion_paths.select do |promotion_path| # if at least one environment in the path is permissible # the path is deemed permissible. (promotion_path - permissible_environments).size != promotion_path.size end end |
#promotable_promotion_paths ⇒ Object
19 20 21 |
# File 'app/models/katello/authorization/organization.rb', line 19 def promotable_promotion_paths permissible_promotion_paths(KTEnvironment.promotable) end |
#readable_promotion_paths ⇒ Object
15 16 17 |
# File 'app/models/katello/authorization/organization.rb', line 15 def readable_promotion_paths permissible_promotion_paths(KTEnvironment.readable) end |
#subscriptions_readable? ⇒ Boolean
31 32 33 |
# File 'app/models/katello/authorization/organization.rb', line 31 def subscriptions_readable? User.current.can?(:view_subscriptions) end |