File tree Expand file tree Collapse file tree
decidim-core/app/cells/decidim Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ class EndorsementButtonsCell < Decidim::ViewModel
2626 # - if users can endorse with many identities (of their user_groups)
2727 # - if users require verification
2828 def show
29+ return render :disabled_endorsements if endorsements_blocked?
2930 return render unless current_user
30- return render :disabled_endorsements if endorsements_blocked_or_user_can_not_participate ?
31+ return render :disabled_endorsements if user_can_not_participate ?
3132 return render :verification_modal unless endorse_allowed?
3233 return render :select_identity_button if user_has_verified_groups?
3334
@@ -63,8 +64,12 @@ def button_content
6364
6465 private
6566
66- def endorsements_blocked_or_user_can_not_participate?
67- current_settings . endorsements_blocked? || !current_component . participatory_space . can_participate? ( current_user )
67+ def endorsements_blocked?
68+ current_settings . endorsements_blocked?
69+ end
70+
71+ def user_can_not_participate?
72+ !current_component . participatory_space . can_participate? ( current_user )
6873 end
6974
7075 def endorse_allowed?
You can’t perform that action at this time.
0 commit comments