Deleting a circle is highly destructive. It removes the group chat
alongside history, as well as the user list. It should definitely be
protected by a confirmation dialogue, I have no clue why it wasn't.
Fixes#153.
Prosody changed its role scheme to only support a single primary role
for each user. In addition, the names of the built-in roles have been
changed. We thus follow those changes to be compatible with the most
recent trunk.
One open question is whether we should switch admin -> operator here,
too (operator being a server-wide admin), but so far there's no need
to.
This is needed because jinja2 had an update which caused the portal to
not work at all:
```
ImportError: cannot import name 'escape' from 'jinja2'
```
Quart needed updating for that.
This update required a lot of typefixes. Apparently, the "canned"
responses (like redirect) are now plain werkzeug responses, while
quart.Response does not inherit from werkzeug.Response (otherwise, we
could've changed the type annotations to werkzeug.Response everywhere,
but that doesn't work because a quart.Response is not a
werkzeug.Response).
P.S.: This time, I *did* check that avatar uploads don't break (see
b007afc).
This helps with removing those users from circles, to avoid them
popping up in peoples roster again.
Even though removal from a circle also only partially works
(roster entries are for instance not cleared), this helps with
ghost users reappearing all the time.
This is useful in situations where the admins of the Snikket
server (i.e. those who care for the docker containers) are not the
same people as the people who are admins of the Snikket service
(i.e. those who care for the users).
This aggregates the user actions behind a single "edit" button on
the list view, making it less crammed. It also offers the
functionality of actually editing the user, mind.
Also in preparation for #42.
Requires https://hg.prosody.im/prosody-modules/rev/5bc706c2db8f.
Eventually, we need to clear that on the backend, but for now we
deal with it in the frontend.
Bonus: this also optimises the display of the circle by removing
O(n) backend requests.
Otherwise, this gives a nasty 500. A proper fix would be to flash
a message and return to the invite list, but that’s more complex
and will be tracked in #40.
- Manage members
- Update name
(Normally, I’d fix this up into the initial implementation
commit, but things happened in between and the rebase would be
painful.)
Previously, some kinds of errors would throw nice and fun cascades
of exceptions.
We now have a nice, clean error page for 500 and 503 (backend
connectivity) errors which includes minimal debugging information
for productive setups and a traceback for development setups.
In any case, the full exception is logged to the log with an error
ID which is printed on the error page.
- Avoid fighting import cycles using a factory function
- Collapse useless subpackages into simple modules
- Move flask plugins / infrastructure in own module
- Refactor how blueprints are used to localize information about
URL routing to app factory