lib/decidim/admin/features/base_controller.rb in decidim-admin-0.0.3 vs lib/decidim/admin/features/base_controller.rb in decidim-admin-0.0.5
- old
+ new
@@ -14,11 +14,15 @@
:current_participatory_process,
:parent_path
delegate :active_step, to: :current_participatory_process, prefix: false
- before_action do
+ before_action except: [:index, :show] do
authorize! :manage, current_feature
+ end
+
+ before_action on: [:index, :show] do
+ authorize! :read, current_feature
end
def current_feature
request.env["decidim.current_feature"]
end