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 <[email protected]>
  • Loading branch information
ElviaBth and alecslupu authored Aug 12, 2024
1 parent bcbce2e commit 9ee8c38
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ def participatory_process_user_role?(user, participatory_process = nil)

def assembly_user_role?(user, assembly = nil)
return false unless Decidim.module_installed?(:assemblies)
return false unless assembly.is_a?(Decidim::Assembly)

if assembly.is_a?(Decidim::Assembly)
Decidim::AssemblyUserRole.exists?(user:, assembly:)
else
Decidim::AssemblyUserRole.exists?(user:)
end
Decidim::AssemblyUserRole.exists?(user:, assembly:)
end

def conference_user_role?(user, conference = nil)
Expand Down

0 comments on commit 9ee8c38

Please sign in to comment.