Skip to content

Commit

Permalink
Adapt overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi committed Oct 31, 2024
1 parent 05f7a7e commit 3f39b21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def initiative_admin_user_action?
return unless permission_action.subject == :initiative

case permission_action.action
when :read
toggle_allow(Decidim::Initiatives.print_enabled)
when :print
toggle_allow(Decidim::Initiatives.print_enabled && user.admin?)
when :publish, :discard
toggle_allow(initiative.validating?)
when :unpublish
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/overrides_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
files: {
"/app/cells/decidim/initiatives/initiative_metadata_g_cell.rb" => "e41380534ae3c4c441530a6739e3746a",
"/app/models/decidim/initiative.rb" => "77c9775fcff404b16e5a382915116fe1",
"/app/permissions/decidim/initiatives/admin/permissions.rb" => "805ba1e544cc3883baec90a357596320",
"/app/permissions/decidim/initiatives/admin/permissions.rb" => "c0f9bf5d9edaca545a7c931c0dc5c0e9",
"/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb" => "849e1ad297a15bb00e34122d3b845ff9",
"/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb" => "40c663fcb732743399b4fe79605e7823"
}
Expand Down

0 comments on commit 3f39b21

Please sign in to comment.