Adapt user endpoints to the 1.19 UserSource schema#239
Merged
Conversation
Core 1.19 drops `user.auth_mode` and `user.authclient_id`; user provenance moves to `user.user_source` and external auth-client identities move into the `user_auth` table. - `GET /user/get-by-authclient` now looks up `user_auth(source, source_id)` only — the legacy column query would SQL-error on 1.19. - Account responses expose `user_source` instead of `authclient` / `authclient_id`. Incoming `authclient` is still accepted as an alias for `user_source` for one release. - Swagger schema and changelog updated; the (Unreleased) heading is bumped to 0.12.0 to match module.json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core 1.19 drops
user.auth_modeanduser.authclient_id. Provenance moves touser.user_source; external auth-client identities move into theuser_authtable. This PR aligns the REST API accordingly.GET /user/get-by-authclientnow looks upuser_auth(source, source_id)only — the legacy column query would SQL-error on 1.19.user_sourceinstead ofauthclient/authclient_id.authclientis still accepted as an alias foruser_sourcefor one release, so clients have a window to migrate.module.json(was still showing0.11.3).See also: humhub/humhub
enh/user-source— UserSource refactoring on core.Breaking changes (for clients)
account.authclient→account.user_source.account.authclient_idis removed (external IDs are now per-AuthClient rows inuser_auth, accessible via existing endpoints).account.authclientis mapped touser_sourcetransparently;account.authclient_idis no longer accepted — usePOST /user/{id}/auth-clientto attach external identities.Test plan
GET /user/{id}returnsuser_sourcein the account objectGET /user/get-by-authclient?name=ldap&id=<dn>returns the user after an LDAP login on 1.19POST /userwith legacyaccount.authclient=localstill creates a user withuser_source=localPOST /userwithaccount.user_source=localcreates a user withuser_source=local