Browse Source

Put managing resources button behind a feature flag

pull/2676/head
Kat 2 years ago
parent
commit
1d04ad5050
  1. 4
      app/services/feature_toggle.rb
  2. 2
      app/views/layouts/_collection_resources.html.erb

4
app/services/feature_toggle.rb

@ -38,4 +38,8 @@ class FeatureToggle
def self.allow_future_resource_updates?
!Rails.env.production? && !Rails.env.test?
end
def self.managing_resources_enabled?
!Rails.env.production?
end
end

2
app/views/layouts/_collection_resources.html.erb

@ -23,4 +23,4 @@
<% end %>
</div>
<%= govuk_button_link_to "Manage collection resources", collection_resources_path, secondary: true, class: "govuk-!-margin-bottom-2" if current_user&.support? %>
<%= govuk_button_link_to "Manage collection resources", collection_resources_path, secondary: true, class: "govuk-!-margin-bottom-2" if current_user&.support? && FeatureToggle.managing_resources_enabled? %>

Loading…
Cancel
Save