Commit 60471beed5f408cccd0c59c184e705aeb94dc169

Authored by Vasiliy Ermolovich
2 parents e35f48e9 065cc790
Exists in master and in 1 other branch production

Merge pull request #288 from luxflux/patch-2

Some more stuff about LDAP
[ci skip]
Showing 1 changed file with 10 additions and 0 deletions   Show diff stats
README.md
... ... @@ -280,6 +280,7 @@ GITHUB_ACCESS_SCOPE=repo,public_repo
280 280 * In `config/config.yml`, set `user_has_username` to `true`
281 281 * Follow the instructions at https://github.com/cschiewek/devise_ldap_authenticatable
282 282 to set up the devise_ldap_authenticatable gem.
  283 + * Ensure to set ```config.ldap_create_user = true``` in ```config/initializers/devise.rb```, this enables creating the users from LDAP, otherwhise login will not work.
283 284 * Create a new initializer (e.g. ```config/initializers/devise_ldap.rb```) and add the following code to enable ldap authentication in the User-model:
284 285 ```ruby
285 286 Errbit::Config.devise_modules << :ldap_authenticatable
... ... @@ -295,6 +296,15 @@ Errbit::Config.devise_modules &lt;&lt; :ldap_authenticatable
295 296 end
296 297 ```
297 298  
  299 + * Now login with your user from LDAP, this will create a user in the database
  300 + * Open a rails console and set the admin flag for your user:
  301 +
  302 +```ruby
  303 +user = User.first
  304 +user.admin = true
  305 +user.save!
  306 +```
  307 +
298 308 Upgrading
299 309 ---------
300 310 When upgrading Errbit, please run:
... ...