Sha256: b675f05e5a3cee9964b5e1fa8ac2ee28e99de6da3e584229bc2b9bc4476484a7
Contents?: true
Size: 953 Bytes
Versions: 36
Compression:
Stored size: 953 Bytes
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 delegate :user_groups, to: :current_user, prefix: false included do helper Decidim::UserProfileHelper layout "layouts/decidim/user_profile" helper_method :available_authorization_handlers, :user_groups before_action :current_user authorize_resource :current_user end # Public: Available authorization handlers in order to conditionally # show the menu element. def available_authorization_handlers current_organization.available_authorizations.map(&:constantize) end end end
Version data entries
36 entries across 36 versions & 2 rubygems