boreq
0692aa27b9
Add a way to list notices as JSON
...
Previously notices could only be displayed as HTML. This commit makes it
possible to request a list of notices as JSON. This can be used to
programmatically display a description of a room server in SSB clients.
The behaviour is governed by a query parameter. To list notices as JSON
set a query parameter "encoding" to "JSON" when listing notices (for
example https://example.com/notice/list?encoding=json ). This parameter
was chosen instead of using the "Accept" header as similar behaviour is
already exhibited by other endpoints (namely the invite mechanism).
2022-11-08 16:16:54 +01:00
decentral1se
00a1452cfc
Migrate to ssbc urls ( #336 )
...
* fix: ssbc urls
Closes https://github.com/ssbc/go-ssb-room/issues/332
* fix: go-ssb-refs API changes
* test: go-ssb-refs API changes
Co-authored-by: decentral1se <cellarspoon@riseup.net>
Co-authored-by: André Staltz <andre@staltz.com>
2022-11-07 11:18:13 +02:00
Henry
a249fd8bee
fix SPDX headers and add reuse API badge
2021-10-08 14:39:31 +02:00
Henry
4d3610e2fb
prepare v2 release
2021-05-31 14:51:05 +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
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
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
cblgh
c6077337d1
use more robust identifier for test
2021-04-20 10:36:40 +02:00
cblgh
1c5c0b9867
make tests more robust when validating specific csrf token
2021-04-20 09:22:53 +02:00
Henry
cec7bc0e44
add flash message helper
2021-04-12 14:09:09 +02:00
Henry
377f3512a2
remove member nickname and alias suggestion
...
insert-user: remove nickname
2021-03-29 15:53:33 +02:00
Henry
f96b916177
final fixes
...
* fix auth test
* fix notices test and parallelize
* cleanup unused input lookup
2021-03-26 18:27:14 +01:00
Andre Staltz
09fcd573b4
style all the sign-in pages
2021-03-26 18:16:26 +01:00
Henry
e9883a049b
various fixes
2021-03-26 13:45:21 +01:00
Henry
8c48b4a2b8
web/handlers
2021-03-22 13:02:37 +01:00
Henry
d39d1ac6e9
go fmt ./... the last PR
2021-03-16 15:13:05 +01:00
Alexander Cobleigh
110e7813a8
Apply suggestions from code review
...
Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
2021-03-16 14:13:33 +01:00
cblgh
cc17f97077
update to use roomdb instead of admindb
2021-03-16 14:08:12 +01:00
cblgh
0a90dd1c60
update some comments
2021-03-16 14:08:12 +01:00
Henry
ae44a878b8
add test for visibility of notice edit buttons
2021-03-16 14:08:12 +01:00
cblgh
8d35860cde
add basic smoke tests for notices
2021-03-16 14:08:12 +01:00