Sha256: 49ddba9590ce4ec0bcf5f0e916ddfa869eab53164c537e445affd61401453ae5
Contents?: true
Size: 1.11 KB
Versions: 13
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses class ParticipatoryProcessGroupsController < Decidim::ParticipatoryProcesses::ApplicationController helper Decidim::SanitizeHelper helper_method :participatory_processes, :group before_action :set_group def index enforce_permission_to :list, :process_group end def show enforce_permission_to :read, :process_group, process_group: @group end private def participatory_processes @participatory_processes ||= if current_user return group.participatory_processes.published if current_user.admin group.participatory_processes.visible_for(current_user).published else group.participatory_processes.published.public_spaces end end def set_group @group = Decidim::ParticipatoryProcessGroup.find(params[:id]) end attr_reader :group end end end
Version data entries
13 entries across 13 versions & 1 rubygems