Sha256: 9000c7e566248d36212695f7c021236a7768b46769862ed031edf8e034639822
Contents?: true
Size: 918 Bytes
Versions: 13
Compression:
Stored size: 918 Bytes
Contents
module Spider module Admin def self.apps @apps ||= Spider::OrderedHash end def self.register_app(mod, controller, options) @apps[mod.short_name] = { :module => mod, :controller => controller, :options => options || {} } Admin::AdminController.route mod.short_name, controller, :do => lambda{ |app_name| @scene.current_app = Spider::Admin.apps[app_name] } end def self.allowed_users users = [] @apps.each do |name, app| users += app[:options][:users] if app[:options][:users] end users += self.base_allowed_users users.uniq end def self.base_allowed_users [Spider::Auth::SuperUser] end end end
Version data entries
13 entries across 13 versions & 1 rubygems