From a6def9336ff49cea38abd429d7337551a5015250 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Wed, 16 May 2018 12:33:46 -0700 Subject: [PATCH] Added example LDAP Data page --- README.md | 2 ++ example/default.md | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 example/default.md diff --git a/README.md b/README.md index 131a5c4..e3cab66 100644 --- a/README.md +++ b/README.md @@ -171,3 +171,5 @@ If either the `user_dn`, `search_dn`, `group_dn` or `group_query` are incorrect If you expect `fullname`, or `email` to be stored in the Grav user object, but they are not appearing, it's probably a problem with your field mappings. Double check with your LDAP administrator that these are the correct mappings. +Under the `example` folder you can find a `default.md` page that you can use to see the data collected during LDAP authentication. It's an useful way for configuring the plugin as well as tweaking the Blacklist. + diff --git a/example/default.md b/example/default.md new file mode 100644 index 0000000..dbeb10d --- /dev/null +++ b/example/default.md @@ -0,0 +1,21 @@ +--- +title: LDAP Data +cache_enabled: false +process: + twig: true +access: + site.login: true +--- + +# This is a secure page... +## Welcome {{ grav.user.fullname }} + +User `{{ grav.user.username }}` {{ grav.user.exists ? '**has** a' : 'does **not** have' }} local account... + +* username: `{{ grav.user.username }}` +* email: `{{ grav.user.email }}` +* login: `{{ grav.user.login }}` +* provider: `{{ grav.user.provider }}` +* groups: {{ vardump(grav.user.groups) }} +* access: {{ vardump(grav.user.access) }} +* ldap: {{ vardump(grav.user.ldap) }}