Hide button to sync execution environments from unauthorized users

This commit is contained in:
Sebastian Serth
2023-11-20 22:25:28 +01:00
parent 967a9efbe9
commit aeb2bb2542

View File

@ -1,6 +1,6 @@
h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2) h1.d-inline-block = ExecutionEnvironment.model_name.human(count: 2)
- if Runner.management_active? - if Runner.management_active? && policy(ExecutionEnvironment).sync_all_to_runner_management?
= button_to( { action: :sync_all_to_runner_management }, { form_class: 'float-end mb-2', class: 'btn btn-success' }) = button_to( { action: :sync_all_to_runner_management }, { form_class: 'float-end mb-2', class: 'btn btn-success' })
i.fa-solid.fa-upload i.fa-solid.fa-upload
= t('execution_environments.index.synchronize_all.button') = t('execution_environments.index.synchronize_all.button')