Skip to content

Commit

Permalink
Update decidim-core/app/helpers/concerns/decidim/user_role_checker.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
  • Loading branch information
ElviaBth and alecslupu committed Aug 12, 2024
1 parent 6e4f318 commit 9476aa9
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ def user_has_any_role?(user, participatory_space = nil)

def participatory_process_user_role?(user, participatory_process = nil)
return false unless Decidim.module_installed?(:participatory_processes)
return false unless participatory_process.is_a?(Decidim::ParticipatoryProcess)

if participatory_process.is_a?(Decidim::ParticipatoryProcess)
Decidim::ParticipatoryProcessUserRole.exists?(user:, participatory_process:)
else
Decidim::ParticipatoryProcessUserRole.exists?(user:)
end
Decidim::ParticipatoryProcessUserRole.exists?(user:, participatory_process:)
end

def assembly_user_role?(user, assembly = nil)
Expand Down

0 comments on commit 9476aa9

Please sign in to comment.