Class: UffizziCore::Api::Cli::V1::Projects::ClustersPolicy
- Inherits:
-
UffizziCore::ApplicationPolicy
- Object
- UffizziCore::ApplicationPolicy
- UffizziCore::Api::Cli::V1::Projects::ClustersPolicy
- Defined in:
- app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb
Instance Method Summary collapse
- #create? ⇒ Boolean
- #destroy? ⇒ Boolean
- #index? ⇒ Boolean
- #scale_down? ⇒ Boolean
- #scale_up? ⇒ Boolean
- #show? ⇒ Boolean
- #sync? ⇒ Boolean
Instance Method Details
#create? ⇒ Boolean
12 13 14 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 12 def create? context.user_access_module.admin_or_developer_access_to_project?(context.user, context.project) end |
#destroy? ⇒ Boolean
28 29 30 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 28 def destroy? context.user_access_module.admin_or_developer_access_to_project?(context.user, context.project) end |
#index? ⇒ Boolean
4 5 6 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 4 def index? context.user_access_module.any_access_to_project?(context.user, context.project) end |
#scale_down? ⇒ Boolean
16 17 18 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 16 def scale_down? context.user_access_module.admin_or_developer_access_to_project?(context.user, context.project) end |
#scale_up? ⇒ Boolean
20 21 22 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 20 def scale_up? context.user_access_module.admin_or_developer_access_to_project?(context.user, context.project) end |
#show? ⇒ Boolean
8 9 10 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 8 def show? context.user_access_module.any_access_to_project?(context.user, context.project) end |
#sync? ⇒ Boolean
24 25 26 |
# File 'app/policies/uffizzi_core/api/cli/v1/projects/clusters_policy.rb', line 24 def sync? context.user_access_module.any_access_to_project?(context.user, context.project) end |