Commit Graph

20 Commits

Author SHA1 Message Date
Jonas Schäfer
13b2a76c3d Fix mypy errors introduced in b007afc901 2021-05-27 16:33:46 +02:00
Matthew Wild
7f02746f63 admin: Re-disable 'limited' role (accidentally uncommented in c58ce8450) 2021-05-19 21:59:16 +01:00
Jonas Schäfer
c58ce8450f Fix type annotations after bumping dependencies 2021-05-18 14:33:06 +02:00
Jonas Schäfer
a48abacf1d Disable restricted role for now
It is not implemented in snikket-server yet, so we don’t want to
put anything misleading out there.
2021-03-25 17:32:03 +01:00
Jonas Schäfer
ea7ed7c030 Add support for roles
Requires patches to prosody trunk which have been submitted
already (2021-03-22) which introduce the set_roles function on
usermanager.

Fixes #42.
2021-03-25 17:31:56 +01:00
Jonas Schäfer
cca899bd8c Create "Edit user" form
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.
2021-03-25 17:31:49 +01:00
Jonas Schäfer
a9a651be09 Render invite form below user list
Fixes #73.
2021-03-22 15:03:18 +01:00
Jonas Schäfer
ad229d6700 Use standard error rendering for the login form
This provides a consistent UX.
2021-03-20 16:30:42 +01:00
Jonas Schäfer
713da89445 Add flash message feedback to all relevant user actions
Fixes #40.
2021-02-06 12:00:55 +01:00
Jonas Schäfer
ba18fe692f Fix ClientResponseError if a circle has a deleted user
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.
2021-02-03 18:25:29 +01:00
Jonas Schäfer
ba3440b169 Properly catch 404 on deleted invite
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.
2021-01-30 12:47:37 +01:00
Jonas Schäfer
2f368e0a34 Change "reusability" to "type" for invites
- This makes the choice much clearer
- Allows for less generic terms in the table
- Future extensibility \o/
2021-01-27 17:16:30 +01:00
Jonas Schäfer
a6d20a0a73 Change generic Apply labels to something more semantic
In context of #33.
2021-01-26 16:12:23 +01:00
Jonas Schäfer
62226c26ac Require non-empty circle name when creating a new circle 2021-01-23 18:49:48 +01:00
Jonas Schäfer
fe43479b19 Password reset link support
This also includes a restructure of the admin API usage because it
was restructured upstream :).
2021-01-23 14:07:30 +01:00
Jonas Schäfer
e18b733017 Add more features to circle editor
- 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.)
2021-01-21 18:09:57 +01:00
Jonas Schäfer
b6188ed29f Add button to export debug info of a user 2021-01-21 18:09:57 +01:00
Jonas Schäfer
f363ff0b38 Fix error handling
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.
2021-01-21 18:09:55 +01:00
Jonas Schäfer
17efe53106 Implement group support (we call ’em circles) 2021-01-21 16:55:10 +01:00
Jonas Schäfer
fa700bba07 Massive code cleanup
- 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
2021-01-17 20:11:25 +01:00