This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow admins to require a manual approval process before new accounts can be used (using MSC3866) #13556
Merged
Merged
Allow admins to require a manual approval process before new accounts can be used (using MSC3866) #13556
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f7c9743
Add experimental config options and constant for MSC3866
babolivier 1eaff08
Add storage support for checking and updating a user's approval status
babolivier 685f76f
Block new accounts after registering if configured to do so
babolivier 5d08fe2
Block login if a user requires approval and the server is configured …
babolivier 7b532a9
Change admin APIs to support checking and updating the approval statu…
babolivier eedaed1
Changelog
babolivier ffaea1e
Use a boolean in the database schema
babolivier 0230200
Incorporate review
babolivier 562aa7a
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier 868ab64
Incorporate review
babolivier 836aa32
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier 8d091b4
Correctly filter on bools, not ints
babolivier 116fc53
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier a87d2f7
Don't create a new device if the new user needs approval
babolivier 08d85f5
Test that we raise the error on SSO logins
babolivier 7585098
Test that we don't register devices for users needing approval
babolivier 75cf999
Lint
babolivier f4a7f16
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier df0c887
Incorporate review
babolivier 3f93dda
Fix test
babolivier 577967c
Lint
babolivier 7a5425a
Incorporate review
babolivier 560e160
Incorporate latest change in the MSC
babolivier 7d71712
Add comment to try to catch bool()ing NULLs in the future
babolivier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Allow server admins to require a manual approval process before new accounts can be used (using [MSC3866](https://github.com/matrix-org/matrix-spec-proposals/pull/3866)). |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
wonder if we should be using the Pydantic models instead of attrs here so you get the validation? For some reason I'm under the impression that this is already done in some of the config, but feel free to punt it for now if it's too much faff.
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.
Looks like we're only doing it in http handlers. Also I'm not sure I see the point of validation to this extent for experimental, if-you-use-this-without-knowing-exactly-what-you're-doing-you're-on-your-own options.
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.
We're free to use it wherever we want to. The original suggestion was to use it for config and I even prototyped this: #12651 (comment)
We don't have many examples of using Pydantic yet so I wouldn't force it on anyone. We would probably need some glue code for config too?
But I think it is pretty good at what it does, gives better error messages earlier and gives us an opportunity to propagate more types through Synapse.
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.
No strong opinion but presumably this won't always be an experimental option, at which point it will just get renamed into something unexperimental? So I don't really buy that we should do things less properly for experimental options, but it's only a minor thought