Sha256: 822d2d62b5f594609df4bf783092116a5a55670be1b935e9d07d907054fd289f
Contents?: true
Size: 643 Bytes
Versions: 4
Compression:
Stored size: 643 Bytes
Contents
# frozen_string_literal: true require_dependency "decidim/application_controller" module Decidim # The controller to handle the user's account page. class AccountController < ApplicationController helper_method :authorizations, :handlers authorize_resource :user_account, class: false private def handlers @handlers ||= Decidim.authorization_handlers.reject do |handler| authorized_handlers.include?(handler.handler_name) end end def authorizations @authorizations ||= current_user.authorizations end def authorized_handlers authorizations.map(&:name) end end end
Version data entries
4 entries across 4 versions & 1 rubygems