Commit Graph

36 Commits

Author SHA1 Message Date
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
Kim Alvefur
329916e200 Update for switch to datamapper in mod_rest
mod_rest after the switch to the new util.datamapper in
https://hg.prosody.im/prosody-modules/rev/073f5397c1d2 does not accept
boolean True as value for the xep-0092 'version' field. An empty object
is equivalent and compatible with both previous and future versions.
2021-03-23 21:38:34 +01:00
Jonas Schäfer
025172592f Improve error handling in Prosody version retrieval 2021-03-09 22:20:37 +01:00
Kim Alvefur
6de1e5313f Add support for displaying prosody version
This only works for authenticated users even in debug mode because
it requires a session with prosody to send the request.

Fixes #66.
2021-03-09 22:08:58 +01:00
Jonas Schäfer
6dbe2c2d5e Fix missing type annotation 2021-02-23 21:18:14 +01:00
Jonas Schäfer
e410aedfef Improve logging of rejected IQ calls 2021-02-23 20:21:44 +01:00
Jonas Schäfer
1713da61e7 Fix password change
This fixes a regression introduced in e476d9b7 which caused the
token to be incorrectly used when authenticating with mod_rest for
sending the password change IQ stanza.
2021-02-23 20:20:47 +01:00
Jonas Schäfer
b04c4fa42d Force setting the SNIKKET_DOMAIN as HTTP Host when talking to prosody
This is required if the portal is talking to a Prosody with
multiple HTTP domains and it doesn’t have http_default_host set...
In a true snikket, this doesn’t happen, but we all know...
2021-01-31 15:29:21 +01:00
Jonas Schäfer
5f1d3ba307 Implement password reset flow 2021-01-30 10:49:28 +01:00
Matthew Wild
a6aef681a7 Add support for 'roster' invite type 2021-01-28 11:00:05 +00:00
Jonas Schäfer
df75fbaa1b Add support for circles with MUCs 2021-01-26 16:12:07 +01:00
Jonas Schäfer
c1132ae975 Implement invite flow in the web portal
This allows us to translate the pages using the same tooling and
to have consistent theming.
2021-01-25 17:10:42 +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
2f7b99c3cc Implement token revocation
Fixes #18.
2021-01-21 19:30:19 +01:00
Jonas Schäfer
2eed571fbb Fix type annotation 2021-01-21 18:42:59 +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
065c065b3b Determine the profile visiblity more conservatively
This will ensure that the user is not incorrectly shown a lower
visibility level than parts of their profile have.
2021-01-21 16:55:11 +01:00
Jonas Schäfer
17efe53106 Implement group support (we call ’em circles) 2021-01-21 16:55:10 +01:00
Jonas Schäfer
427f73811c Add support for modifying profile access model
Fixes #17.
2021-01-17 20:12:01 +01:00
Jonas Schäfer
fadbdaf204 Restore compatibility with Python 3.7 2021-01-17 20:11:26 +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
Jonas Schäfer
e476d9b7c2 Implement admin dashboard
Fixes #23.
2021-01-17 20:10:04 +01:00
Jonas Schäfer
9e3fcbaf67 Prepare for fully typechecked codebase 2021-01-16 16:05:54 +01:00
Jonas Schäfer
d3777d3b07 Make flake8 happy 2021-01-16 15:22:46 +01:00
Jonas Schäfer
909a8ef2a7 Update logout comment with relevant feature request 2020-04-30 16:14:14 +02:00
Jonas Schäfer
22a371444d Remove compatibility hacks after bugs got fixed
See-Also: https://issues.prosody.im/1500
See-Also: https://issues.prosody.im/1501
2020-04-30 16:14:14 +02:00
Jonas Schäfer
12276337c1 Partially log requests sent to the API
Payloads containing sensitive content (such as passwords and
tokens) should be hidden.
2020-04-30 16:14:14 +02:00
Jonas Schäfer
880b4c22d0 Get rid of debug prints 2020-04-30 16:14:14 +02:00
Jonas Schäfer
04d9f9fd9b Properly handle the various login error conditions
Note that this includes setting content types on the sessions,
which is why this spills over into the XML IQ function.
2020-04-30 16:14:14 +02:00
Jonas Schäfer
71733adc90 Fix various edge cases around stale sessions
If a session cookie is set, but prosody doesn’t know about the
session anymore, we could get into fun states. This patch fixes
them by requiring the session to be tested with a ping request
on each HTTP request.
2020-03-07 13:11:45 +01:00
Jonas Schäfer
c902c59f8b Implement support for avatars 2020-03-07 12:38:17 +01:00
Jonas Schäfer
944cd333b3 Add support for a profile change page 2020-03-07 11:16:29 +01:00
Jonas Schäfer
9318b0d152 Implement support for password change and logout
Note the hack.
2020-02-29 13:43:10 +01:00
Jonas Schäfer
aade4c67fd Bootstrap initial thing which can login 2020-02-29 12:37:56 +01:00