Logo
Explore Help
Register Sign In
starred/vaultwarden
1
0
Fork 0
You've already forked vaultwarden
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-12-14 17:23:21 +03:00
Code Issues 429 Packages Projects Releases 10 Wiki Activity
Files
d6b97090fab5eba429a79c35735a0760b2fa9ee2
vaultwarden/migrations/mysql/2023-09-02-212336_move_user_external_id/up.sql

3 lines
61 B
MySQL
Raw Normal View History

Fix External ID not set during DC Sync While working on the fix I realised the location where the `external_id` is stored was wrong. It was stored in the `users` table, but it actually should have been stored in the `users_organizations` table. This will move the column to the right table. It will not move the values of the `external_id` column, because if there are more organizations, there is no way to really know which organization it is linked to. Setups using the Directory Connector can clear the sync cache, and sync again, that will store all the `external_id` values at the right location. Also changed the function to revoke,restore an org-user and set_external_id to return a boolean. It will state if the value has been changed or not, and if not, we can prevent a `save` call to the database. The `users` table is not changed to remove the `external_id` column, thi to prevent issue when users want to revert back to an earlier version for some reason. We can do this after a few minor release i think. Fixes #3777
2023-09-02 23:57:43 +02:00
ALTER TABLE users_organizations
ADD COLUMN external_id TEXT;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 161ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API