-
Notifications
You must be signed in to change notification settings - Fork 25
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
User modify API requires a redesign #100
Comments
(re)implementation ideas:
(i previously put it into #90, the wrong place. sorry!) |
You could change the initial report here: user-type works now :-) (not the most beautiful solution, but works now at least ;-) |
Ok so before we continuie with refactoring ideas here I'd like to state one design idea that I think kind of was with 'synadm' from when I started coding it. For example: When the docs say that it's possible to "omit" a json text from the post data, the api method should be able to do that as well. If we take the api in question, let's have a look, we see that a lot of the parts of the json are marked as "optional". In that case leaving them out entirely from the post dasta would mean "leave that setting untouched": https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#create-or-modify-account With that in mind, let's start to collect ideas. The first thing that comes up is a simple one and would improve the "falsy" problem: Change all the exclusion conditions to use
|
I think with that we would finally fix what I was aiming for in the first place:
Only I'm wondering what kind of value that could be? Simply a string? Named 'undefined'? Sounds ugly, but actually is the functionality we want :-) |
api method. Fixes a bug where setting an admin-enabled user back to a normal user is not possible (issue #100).
Reopening. Was closed because the two bugs that were introduced due to this clumsy design were actually (quick) fixed. Please @JacksonChen666 go ahead with a more robust reimplementation of the user_modify method. Appreciated! My personal opinion is that a "good enough" solution would be to just use |
now throwing my thoughts into how the new user modify API should be:
|
splitting sounds good. it's a messy thing trying to do too much currently |
Just adding my use case as it can't be fulfilled by the current design: I need to remove a 3pid from a user, could this be possible with the redesign of the command? |
Not yet, see checklist. The plan is to eventually have something, but for now, you still have |
From what I understand of the docs and my tests, this option does not allow to remove/override the existing 3pids, only to add more:
|
The user modify API and command works together poorly, unable to remove admin rights (too lazy to write that word). This is because it's using implicit if conditions, where values of
False
andNone
is used as defined values, but is interpreted as non-defined values.Example:
you can give admin, not remove. you can set user type (#90), you can't revert to default user type.Originally posted by @JacksonChen666 in #90 (comment)
The text was updated successfully, but these errors were encountered: