Module: Katello::Authorization::Organization
- Extended by:
- ActiveSupport::Concern
- Includes:
- Authorizable
- Defined in:
- app/models/katello/authorization/organization.rb
Instance Method Summary collapse
- #can_export_content? ⇒ Boolean
- #can_import_content? ⇒ Boolean
- #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
#can_export_content? ⇒ Boolean
19 20 21 |
# File 'app/models/katello/authorization/organization.rb', line 19 def can_export_content? (:export_content) end |
#can_import_content? ⇒ Boolean
15 16 17 |
# File 'app/models/katello/authorization/organization.rb', line 15 def can_import_content? (:import_content) end |
#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
31 32 33 34 35 36 37 |
# File 'app/models/katello/authorization/organization.rb', line 31 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
27 28 29 |
# File 'app/models/katello/authorization/organization.rb', line 27 def promotable_promotion_paths permissible_promotion_paths(KTEnvironment.promotable) end |
#readable_promotion_paths ⇒ Object
23 24 25 |
# File 'app/models/katello/authorization/organization.rb', line 23 def readable_promotion_paths permissible_promotion_paths(KTEnvironment.readable) end |
#subscriptions_readable? ⇒ Boolean
39 40 41 |
# File 'app/models/katello/authorization/organization.rb', line 39 def subscriptions_readable? User.current.can?(:view_subscriptions) end |