Sha256: 72c92533a22d40fcd1d7318d26667556dad300a49ea3a1d45f0384167ebf06ef
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true module Decidim module DirectVerifications module Verification module Admin class AuthorizationsController < Decidim::Admin::ApplicationController layout "decidim/admin/users" def index enforce_permission_to :index, :authorization @authorizations = collection.includes(:user) end def destroy if authorization.destroy flash[:notice] = "successfully" redirect_to authorizations_path end end private def collection # Decidim::Verifications::Authorizations Query Decidim::Verifications::Authorizations.new( organization: current_organization, name: "direct_verifications", granted: true ).query end def authorization @authorization ||= collection.find_by(id: params[:id]) end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems