Sha256: 843815b104bceb567eff1bce80c3a059fcdf0f08376c162946a1c1c7e0789f7b
Contents?: true
Size: 1.01 KB
Versions: 58
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim # The UserProfile concern must be included in all the controllers # that are shown in the user's profile settings. It adds the # proper layout, as well as helper methods that help render the # side menu, amongst others. module UserProfile extend ActiveSupport::Concern include FormFactory include UserGroups included do helper Decidim::UserProfileHelper layout "layouts/decidim/user_profile" helper_method :available_verification_workflows before_action :current_user before_action do enforce_permission_to :update_profile, :user, current_user: current_user end end # Public: Available authorization handlers in order to conditionally # show the menu element. def available_verification_workflows Verifications::Adapter.from_collection( current_organization.available_authorizations & Decidim.authorization_workflows.map(&:name) ) end end end
Version data entries
58 entries across 58 versions & 1 rubygems