Init ldap parameters
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Add default ldap auth source
|
||||
|
||||
class Setup < ActiveRecord::Migration[4.2]
|
||||
class ConfigLdap < ActiveRecord::Migration[4.2]
|
||||
|
||||
# look at auth_source.rb
|
||||
# or auth_source_ldap.rb
|
||||
# in path /usr/src/redmine/app/models
|
||||
|
||||
class AuthSourceLdap < ActiveRecord::Base
|
||||
class AuthSources < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.up
|
||||
@@ -44,7 +44,7 @@ class Setup < ActiveRecord::Migration[4.2]
|
||||
# 'timeout')
|
||||
|
||||
# create default administrator account
|
||||
auth = AuthSourceLdap.create
|
||||
auth = AuthSources.new
|
||||
|
||||
auth.type = "AuthSourceLdap"
|
||||
auth.name = "ldap"
|
||||
@@ -58,6 +58,8 @@ class Setup < ActiveRecord::Migration[4.2]
|
||||
auth.attr_lastname = "sn"
|
||||
auth.attr_mail = "mail"
|
||||
auth.onthefly_register = 1
|
||||
auth.verify_peer = 0
|
||||
auth.tls = 0
|
||||
|
||||
auth.save
|
||||
|
||||
|
||||
Reference in New Issue
Block a user