-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client server/user directory #141
Conversation
@@ -9,6 +9,7 @@ | |||
* For reference, look at how the capabilities are checked in the `changeDisplayname` function. ( ../profiles/changeProfiles.ts ) | |||
* | |||
* TODO : Implement capability checks in the concerned API's for changing password and 3pid changes | |||
* (TODO : Implement capability checks in the concerned API's for user_directory search (not specified in spec)) |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
* These tables are used almost solely for the user_directory feature and are not used elsewhere. | ||
* Thus for now these tables are not filled and the feature is not yet usable. | ||
* | ||
* TODO : implement the auto-update and track of these tables |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
clientServer.authenticate(req, res, (data) => { | ||
const userId = data.sub | ||
|
||
// ( TODO : could add a check to the capabilities to see if the user has the right to search for users) |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What says the spec for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec doesn't specify it, it was just an insight on what more could be done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase and merge directly
clientServer.authenticate(req, res, (data) => { | ||
const userId = data.sub | ||
|
||
// ( TODO : could add a check to the capabilities to see if the user has the right to search for users) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What says the spec for this ?
…ch as well as the code of the related endpoint
…ons in the sqlite file, added the necessary tables of the synapses database
0320f42
to
62e3e96
Compare
Implements https://spec.matrix.org/latest/client-server-api/#post_matrixclientv3user_directorysearch
This is not fixed in the spec and could be modified if needed :
- Performs a search for users. The homeserver may determine which subset of users are searched.
- We have decided to consider the users the requesting user shares a room with and those who reside in public rooms (known to the homeserver)
The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search.
( this problem is currently hidden by the use of specific tables in the MatrixDB database)
WARNING : Following Synapse implementation, we have used many tables (user_directory, user_who_share_private_rooms, users_in_public_rooms) to implement this feature.
These tables are used almost solely for the user_directory feature and are not used elsewhere.
Thus for now these tables are not filled and the feature is not yet usable.