Andre Staltz
3c6831d39a
refactor common util StringifySSBURI
2021-11-23 09:20:08 -03:00
Andre Staltz
2d722f2098
unbreak TestInviteShowAcceptForm
2021-11-23 09:20:08 -03:00
Andre Staltz
8c9413d55d
android intent uri does not require package field
2021-11-23 09:20:08 -03:00
Andre Staltz
642022cb0a
fix support for SSB URIs on Android Chrome
2021-11-23 09:20:08 -03:00
Henry
a249fd8bee
fix SPDX headers and add reuse API badge
2021-10-08 14:39:31 +02:00
Tim Nordenfur
5d3ccc7184
combined Invites.Count and Invites.CountActive
2021-06-12 23:43:04 +02:00
Tim Nordenfur
922fa34302
Exclude revoked invites in dashboard invite count
2021-06-10 17:02:16 +02:00
Henry
d147d0642a
fix rendering non-members on the dashboard ( #238 )
...
* fix rendering non-members on the dashboard
fixes #236
* remove alias or feedref code from template
doing this in the template was hard to read and inefficient.
also: rename OnlineMembers to OnlineUsers since it is a misnomer.
There are other connected peers in a room in certain privacy modes.
2021-06-01 14:23:42 +02:00
Henry
580830be76
went a bit too far with search+replace
2021-05-31 14:53:53 +02:00
Henry
4d3610e2fb
prepare v2 release
2021-05-31 14:51:05 +02:00
Henry
f83bf65bb9
don't block dasboard rendering for too long
...
updates #210
2021-05-31 07:38:52 +02:00
Henry
3e53570638
dependency updates
...
* use LICENSEd version of nocomment
* use forked kitlog
* cleanup of various dependencies
2021-05-25 12:40:00 +02:00
Henry
81c05a663d
Support open invites ( fixes #102 )
2021-05-17 10:16:26 +02:00
Henry
385b98a3a1
add privacy mode and role tests ( fixes #185 )
...
* denied/remove
* denied/add
* invites/revoke
* members/remove
* notices/edit
* notices/add
also:
* add members.CheckAction helper
* fix muxrpc abort bug and update to v2.0.5
* strictly use SeeOther not 307 (fixes #149 )
2021-05-14 14:27:01 +02:00
Henry
7c356fa407
change []byte password to string
2021-05-13 07:39:19 +02:00
Henry
be35f154b7
add tests for new password features
...
* reset link creation
* own password change
* setPasswordWithToken
* also: move member handler funcs to own file
2021-05-13 07:39:19 +02:00
Henry
4558b208ee
implement password update flow with reset tokens ( fixes #98 )
...
also update AuthFallback database
* re-write fallback auth to use alias or ssbid
* replace Create() with SetPassword() which does an upsert
* Add reset tokens to sqlite
* add test for SetPassword with reset token
2021-05-13 07:39:14 +02:00
Henry
5bfb5316f8
minor fixes
...
remove unsed about page and fix some typos
2021-05-11 10:17:02 +02:00
Henry
653d0926f7
add password change form
2021-05-11 10:16:35 +02:00
Henry
5385ef65bb
add middleware to check roles
...
fixes #176
2021-05-10 13:52:45 +02:00
Henry
691f0e75b9
add test for notice creation role check
...
updates #176
2021-05-10 13:52:45 +02:00
Henry
e72f1a3787
cleanup redirect mess for denied removal
...
updates #205
2021-05-10 13:51:29 +02:00
Henry
3651432b42
use errHandler in admin tests
2021-04-26 09:29:22 +02:00
cblgh
cae80e385e
make alias mockdb return alias entry
2021-04-26 09:29:22 +02:00
cblgh
f0b4c7a534
test that alias resolving is turned off for restricted rooms
2021-04-26 09:29:22 +02:00
cblgh
ab06233f28
test invite creation under community & restricted for admin, mod & member
...
Update web/handlers/admin/setup_test.go
Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
2021-04-26 09:29:17 +02:00
cblgh
80686dec26
cherrypick: ts.User is now pointer
2021-04-23 13:25:13 +02:00
Henry
57c1375e54
fix missing context
2021-04-23 11:25:35 +02:00
Henry
e6ca0ed74b
remove unused argument
2021-04-23 08:56:01 +02:00
User Cryptix
fc5d3e440e
add json response for invite facade ( fixes #188 )
2021-04-23 08:55:50 +02:00
Andre Staltz
3beb656b9c
change join-room to claim-http-invite
2021-04-23 08:54:29 +02:00
cblgh
cec5f93fb6
tests for restricted UI behavior
...
* add tests for privacy mode settings
* test privacy mode settings for member role
* test default language settings
* test denied keys interface for each role
* test adding new member interface depending on role
* test member details depending on role
* test invite button is disabled pending on user role
2021-04-23 08:34:27 +02:00
cblgh
2c9fdcb98e
update HTML UI to reflect role access restrictions
...
* disable ui if user is unelevated
* disable revoke button if unelevated and not own invite
* improve styling of disabled elements
* remove revoke if alias not made my current user
2021-04-23 08:33:20 +02:00
Andre Staltz
34eef5fb9b
rename address field in alias JSON resolver
2021-04-21 19:46:45 +03:00
cblgh
16985bba8d
rewrite list_languages function to use html/template
2021-04-20 11:49:24 +02:00
cblgh
c6077337d1
use more robust identifier for test
2021-04-20 10:36:40 +02:00
Alexander Cobleigh
a5f7701437
Apply suggestions from code review
...
Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
use eh.Handle
2021-04-20 10:36:34 +02:00
cblgh
0574c9a235
test language picking
2021-04-20 09:22:53 +02:00
cblgh
1c5c0b9867
make tests more robust when validating specific csrf token
2021-04-20 09:22:53 +02:00
cblgh
7759e8f898
add de translation, use []TagTranslation, and sort
...
to make sure the list of languages is sorted, we now use a slice of
TagTranslation{Tag: string, Translation: string} structs, sorted
by `TagTranslation.Tag`.
2021-04-20 09:22:53 +02:00
cblgh
b9fe27b0ca
fix inconsistent cookies, set csrf cookie path
...
while working on the /set-language route, i noticed that i was getting a
csrf error for all /admin views when setting the language, while it
worked well on non-admin routes.
the issue, it turned out, was that we needed to configure gorilla's csrf
feature to set all cookies on the same route. when unconfigured, the
set cookies will only be set for the path they are being set at.
see more in the gorilla.csrf documentation (in particular the csrf.Path
option): https://pkg.go.dev/github.com/gorilla/csrf?utm_source=godoc#Path
2021-04-20 09:22:53 +02:00
cblgh
c97b7d44c3
add default language admin ui functionality
2021-04-20 09:22:49 +02:00
cblgh
682283374d
mock injected functions for tests
2021-04-20 09:12:15 +02:00
cblgh
ee185e5f43
don't render language picker if we have less than 2 translations
2021-04-20 09:12:15 +02:00
cblgh
93f84e04b0
redirect with 303 See Other
2021-04-20 09:12:15 +02:00
cblgh
f535aa8f9c
set & use language cookie
2021-04-20 09:12:13 +02:00
cblgh
9863c6b166
add template func for listing languages
2021-04-20 09:11:41 +02:00
Henry
52ec94e878
fix link generation for alias registration
...
fixes #160
2021-04-19 15:00:35 +02:00
Henry
a78c039cc7
reuse urlTo in urlToNotice
2021-04-19 15:00:35 +02:00
Henry
3323a85226
refactor urlTo to use domain information for all links
2021-04-19 15:00:29 +02:00