diff --git a/README.md b/README.md index dc039ab..9dfd3fd 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,16 @@ user. Whether to allow a user logging in via OIDC to match a pre-existing account instead of failing. +## OIDC_LOCALPART_TEMPLATE +- default: {{ user.preferred_username }} + +Jinja2 template for the localpart of the MXID. + +## OIDC_DISPLAY_NAME_TEMPLATE +- default: {{ user.given_name }} {{ user.last_name }} + +Jinja2 template for the display name to set on first login. + ## SSO_CLIENT_WHITELIST - default: [] diff --git a/rootfs/etc/confd/templates/server.yaml.tmpl b/rootfs/etc/confd/templates/server.yaml.tmpl index 42f8962..c636614 100644 --- a/rootfs/etc/confd/templates/server.yaml.tmpl +++ b/rootfs/etc/confd/templates/server.yaml.tmpl @@ -1782,14 +1782,13 @@ oidc_config: # # This must be configured if using the default mapping provider. # - localpart_template: "{{"{{"}} user.preferred_username {{"}}"}}" + localpart_template: "{{ getenv "OIDC_LOCALPART_TEMPLATE" "{{"{{"}} user.preferred_username {{"}}"}}" }}" # Jinja2 template for the display name to set on first login. # # If unset, no displayname will be set. # - #display_name_template: "{{"{{"}} user.given_name {{"}}"}} {{"{{"}} user.last_name {{"}}"}}" - + display_name_template: "{{ getenv "OIDC_DISPLAY_NAME_TEMPLATE" "{{"{{"}} user.given_name {{"}}"}} {{"{{"}} user.last_name {{"}}"}}" }}" # Jinja2 templates for extra attributes to send back to the client during # login. # diff --git a/rootfs/etc/fix-attrs.d/01-synapse b/rootfs/etc/fix-attrs.d/01-synapse deleted file mode 100644 index df4cbb8..0000000 --- a/rootfs/etc/fix-attrs.d/01-synapse +++ /dev/null @@ -1,2 +0,0 @@ -/var/lib/matrix-synapse/signing/ true matrix-synapse 0640 0750 -/var/lib/matrix-synapse/media_store/ true matrix-synapse 0640 0750