diff options
author | Lukas Oertel | 2023-01-22 18:12:17 +0100 |
---|---|---|
committer | Lukas Oertel | 2023-01-22 18:12:17 +0100 |
commit | e23a1db405b5181f66d2fad6636f89ec2c30948f (patch) | |
tree | 7953f44f081dbb133e01163f0c7a2278bdbb2df7 /scripts/hedgedoc-ldap_to_oauth2/replacements.txt | |
parent | edf1ec190d2125ac5dbdd38635bc0b09f6c71033 (diff) |
scripts/hedgedoc-ldap_to_oauth2: Init
Diffstat (limited to 'scripts/hedgedoc-ldap_to_oauth2/replacements.txt')
-rw-r--r-- | scripts/hedgedoc-ldap_to_oauth2/replacements.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/hedgedoc-ldap_to_oauth2/replacements.txt b/scripts/hedgedoc-ldap_to_oauth2/replacements.txt new file mode 100644 index 0000000..b093101 --- /dev/null +++ b/scripts/hedgedoc-ldap_to_oauth2/replacements.txt @@ -0,0 +1,4 @@ +UPDATE "Users" SET profileid = '$UID', profile = jsonb_set(profile::jsonb, '{id}', '"$UID"') where profileid = '$LDAPID'; +UPDATE "Users" SET profile = profile::jsonb || jsonb_build_object('displayName', profile::json->'username') where profileid = '$UID'; +UPDATE "Users" SET profile = jsonb_set(profile::jsonb, '{username}', '"$UID"') where profileid = '$UID'; +UPDATE "Users" SET profile = jsonb_set(profile::jsonb, '{provider}', '"oauth2"') where profileid = '$UID'; |