Sha256: d49d7dec920f2b7d5cf7e140c1d86ea5cba63417125f10f6da90e3c1b8582da3
Contents?: true
Size: 951 Bytes
Versions: 10
Compression:
Stored size: 951 Bytes
Contents
module Ecm::Rbac module Backend class ImportDefaultPermissionsServiceController < Itsf::Backend::Service::BaseController def self.service_class Ecm::Rbac::ImportDefaultPermissionsService end def invoke @filenames = load_filenames super end def call @filenames = load_filenames super end private def permitted_params params.require(:import_default_permissions_service).permit(:filename) end def load_filenames filenames = ::Rails::Engine.subclasses.map(&:instance).collect do |engine| filename = engine.root.join *%w(config rbac.yml) next unless File.readable? filename filename end.compact application_filename = Rails.root.join *%w(config rbac.yml) filenames << application_filename if File.readable? application_filename# filenames end end end end
Version data entries
10 entries across 10 versions & 1 rubygems