summaryrefslogtreecommitdiff
path: root/app/helpers/application_settings_helper.rb
diff options
context:
space:
mode:
authorJames Fargher <proglottis@gmail.com>2019-05-02 13:07:38 +1200
committerJames Fargher <proglottis@gmail.com>2019-05-07 08:37:04 +1200
commitbeb66cfcba26d0796644ccce2dfac8c65a808144 (patch)
tree6bb32fccb64f91776e946d84c5717d1ae52a9d7e /app/helpers/application_settings_helper.rb
parent8db382b05545fdef0a60bcff65f8c23e8b1ed282 (diff)
downloadgitlab-ce-beb66cfcba26d0796644ccce2dfac8c65a808144.tar.gz
Check instance cluster feature at policy level
Try to simplify feature flag checks by using policies
Diffstat (limited to 'app/helpers/application_settings_helper.rb')
-rw-r--r--app/helpers/application_settings_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb
index 5995ef57e26..971d1052824 100644
--- a/app/helpers/application_settings_helper.rb
+++ b/app/helpers/application_settings_helper.rb
@@ -286,4 +286,8 @@ module ApplicationSettingsHelper
def expanded_by_default?
Rails.env.test?
end
+
+ def instance_clusters_enabled?
+ can?(current_user, :read_cluster, Clusters::Instance.new)
+ end
end