This is an automated email from the ASF dual-hosted git repository.
sfirke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 02b69709bb fix(docs): add missing code formatting, fix broken link
(#27992)
02b69709bb is described below
commit 02b69709bbae0fdb2098f649b57a1a26eeac8b56
Author: Sam Firke <[email protected]>
AuthorDate: Thu Apr 11 14:59:06 2024 -0400
fix(docs): add missing code formatting, fix broken link (#27992)
---
docs/docs/installation/configuring-superset.mdx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/docs/docs/installation/configuring-superset.mdx
b/docs/docs/installation/configuring-superset.mdx
index ac80ef3bf0..ae482ad036 100644
--- a/docs/docs/installation/configuring-superset.mdx
+++ b/docs/docs/installation/configuring-superset.mdx
@@ -302,27 +302,29 @@ It is used to assign roles to users who authenticate
using LDAP or OAuth.
#### Mapping OAUTH groups to Superset roles
-The following AUTH_ROLES_MAPPING dictionary would map the OAUTH group
"superset_users" to the Superset roles "Gamma" as well as "Alpha", and the
OAUTH group "superset_admins" to the Superset role "Admin".
+The following `AUTH_ROLES_MAPPING` dictionary would map the OAUTH group
"superset_users" to the Superset roles "Gamma" as well as "Alpha", and the
OAUTH group "superset_admins" to the Superset role "Admin".
+```python
AUTH_ROLES_MAPPING = {
"superset_users": ["Gamma","Alpha"],
"superset_admins": ["Admin"],
}
-
+```
#### Mapping LDAP groups to Superset roles
-The following AUTH_ROLES_MAPPING dictionary would map the LDAP DN
"cn=superset_users,ou=groups,dc=example,dc=com" to the Superset roles "Gamma"
as well as "Alpha", and the LDAP DN
"cn=superset_admins,ou=groups,dc=example,dc=com" to the Superset role "Admin".
+The following `AUTH_ROLES_MAPPING` dictionary would map the LDAP DN
"cn=superset_users,ou=groups,dc=example,dc=com" to the Superset roles "Gamma"
as well as "Alpha", and the LDAP DN
"cn=superset_admins,ou=groups,dc=example,dc=com" to the Superset role "Admin".
+```python
AUTH_ROLES_MAPPING = {
"cn=superset_users,ou=groups,dc=example,dc=com": ["Gamma","Alpha"],
"cn=superset_admins,ou=groups,dc=example,dc=com": ["Admin"],
}
-
-Note: This requires AUTH_LDAP_SEARCH to be set. For more details, Please refer
(FAB Security
documentation)[https://flask-appbuilder.readthedocs.io/en/latest/security.html].
+```
+Note: This requires `AUTH_LDAP_SEARCH` to be set. For more details, please see
the [FAB Security
documentation](https://flask-appbuilder.readthedocs.io/en/latest/security.html).
#### Syncing roles at login
-You can also use the AUTH_ROLES_SYNC_AT_LOGIN configuration variable to
control how often Flask-AppBuilder syncs the user's roles with the LDAP/OAUTH
groups. If AUTH_ROLES_SYNC_AT_LOGIN is set to True, Flask-AppBuilder will sync
the user's roles each time they log in. If AUTH_ROLES_SYNC_AT_LOGIN is set to
False, Flask-AppBuilder will only sync the user's roles when they first
register.
+You can also use the `AUTH_ROLES_SYNC_AT_LOGIN` configuration variable to
control how often Flask-AppBuilder syncs the user's roles with the LDAP/OAUTH
groups. If `AUTH_ROLES_SYNC_AT_LOGIN` is set to True, Flask-AppBuilder will
sync the user's roles each time they log in. If `AUTH_ROLES_SYNC_AT_LOGIN` is
set to False, Flask-AppBuilder will only sync the user's roles when they first
register.
### Flask app Configuration Hook