Commit 065cc790fd55644befa9f47f1ae7afb421fc3d13
1 parent
e35f48e9
Exists in
master
and in
1 other branch
Some more stuff about LDAP
Found some more stuff on my second run which you have to do when you setup the app
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 << :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: | ... | ... |