Sha256: a974adb1c1f68a85ee37a83dd54c3c3729faa3bd6f84ca23f0ec5743d84812be

Contents?: true

Size: 1.1 KB

Versions: 5

Compression:

Stored size: 1.1 KB

Contents

require 'chaltron/engine'
require 'chaltron/bootstrap_form'
require 'syslog'

module Chaltron
  module Controllers
    autoload :Helpers, 'chaltron/controllers/helpers'
  end

  mattr_accessor :roles
  @@roles = %w( admin user_admin )

  mattr_accessor :default_roles
  @@default_roles = []

  mattr_accessor :ldap_allow_all
  @@ldap_allow_all = true

  mattr_accessor :enable_syslog
  @@enable_syslog = false

  mattr_accessor :syslog_facility
  @@syslog_facility = Syslog::LOG_SYSLOG

  mattr_accessor :ldap_field_mappings
  @@ldap_field_mappings = {
    first_name: 'givenname',
    last_name: 'cn',
    department: 'department',
    email: 'mail'
  }

  mattr_accessor :ldap_group_base
  @@ldap_group_base = nil

  mattr_accessor :ldap_group_member_filter
  @@ldap_group_member_filter = -> (entry) { "uniquemember=#{entry.dn}" }

  mattr_accessor :ldap_role_mappings
  @@ldap_role_mappings = {}

  mattr_accessor :ldap_after_authenticate
  @@ldap_after_authenticate = -> (user, ldap) { user }

  mattr_accessor :ldap_before_logout
  @@ldap_before_logout = -> (user, ldap) { }

  def self.setup
    yield self
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chaltron-0.3.2 lib/chaltron.rb
chaltron-0.3.1 lib/chaltron.rb
chaltron-1.1.1 lib/chaltron.rb
chaltron-0.3.0 lib/chaltron.rb
chaltron-1.1.0 lib/chaltron.rb