Commit Graph

322 Commits

Author SHA1 Message Date
boreq ab664aafc3 Add a JSON endpoint for generating invites
When running in open mode invites can be freely generated by accessing
/create-invite. This displays an HTML page which creates and displays an
invite to the user.

This commit adds an additional way of creating invites in open mode. A
POST request can be sent to the same /create-invite endpoint with the
Accept header set to application/json. This returns a JSON response
which contains an invite url.

The purpose of this change is to make automatic invite generation easier
in SSB clients.
2022-12-13 19:15:11 +01:00
decentral1se 641069a8f1
Merge pull request #351 from boreq/list-notices-as-json
Add a way to list notices as JSON
2022-11-09 10:28:36 +01:00
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 d169aaf137
test: hibp api changes 2022-11-07 21:14:26 +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
staltz c16fceb3ce update production style.css 2022-08-22 09:10:09 +00:00
decentral1se 18062a2305 feat: member can also invite by SSB-ID
Closes https://github.com/ssb-ngi-pointer/go-ssb-room/issues/283
2022-08-22 12:07:25 +03:00
decentral1se 227efa6a79
fix: username -> SSB-ID (#310)
Follows https://github.com/ssb-ngi-pointer/go-ssb-room/pull/308.

Co-authored-by: decentral1se <cellarspoon@riseup.net>
2022-08-22 11:56:16 +03:00
decentral1se 6aaea32407
fix: support password entry for /join-manually (#306)
Closes https://github.com/ssb-ngi-pointer/go-ssb-room/issues/234.

Co-authored-by: decentral1se <cellarspoon@riseup.net>
2022-08-22 11:52:35 +03:00
decentral1se de4321dcb2 fix: user facing "username"/"public key" -> SSB-ID
See https://github.com/ssb-ngi-pointer/go-ssb-room/issues/275.
2022-04-06 14:33:47 +03:00
Benjamin Steinwender 6f5edbaa43
Fix alias generation (#294)
* added test
* fix missing domain
2022-01-18 10:31:01 +02:00
André Staltz dcb09e05ef
Merge pull request #257 from pathab/german-translation
German translation
2021-11-23 09:34:36 -03:00
boreq 5687fd5fa1 Fix alias not being displayed on the invites page
Reading the template of the invites page it was the intention of the
author to display the aliases instead of user refs if they are
available. The code loading the invites wasn't properly loading the
aliases of the useres who created them though always leading to this
data not being populated. This fix populates the aliases when listing
invites.

Additionally turned the invite author field into a link. This requires
some extra styling.

Fixes #245.
2021-11-23 09:22:14 -03:00
Andre Staltz 747f5123f3 remove unnecessary code in withssb.go 2021-11-23 09:20:08 -03:00
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
pathab ad3cf28cb2
Merge branch 'master' into german-translation 2021-10-31 10:38:34 +01:00
cryptix 583bd81976 update production style.css 2021-10-08 12:43:49 +00:00
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
pathab 694d9b2ac0 Compared all keys with active.en.toml and made som corrections 2021-06-26 23:39:03 +02:00
pathab 5dd18b4781 Update active.de.toml 2021-06-26 23:02:23 +02:00
pathab 914a4f98e8 Better German translation (not finished yet) 2021-06-26 10:38:22 +02:00
Tim Nordenfur 6313ee5546 fixed some typos 2021-06-15 16:24:06 +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
Tim Nordenfur 7cdcc3db69 built style.css for production 2021-06-10 13:49:38 +02:00
Tim Nordenfur 18320f9ed7 expand member entry when aliases overflow (#250) 2021-06-10 00:44:48 +02:00
Tim Nordenfur 7c068f2df1 inserted missing paren 2021-06-04 06:39:19 +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
Andre Staltz 4b616ffaad
theme the favicon with pink and peach colors 2021-05-31 12:20:09 +03: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 e7b4d171d9 add deployment version of style.css 2021-05-18 18:34:02 +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 aa50cb4aeb tweak css a bit 2021-05-14 08:06:45 +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 336596552e fix HTML in i18n strings
previously it just worked on errors
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 3d9c567cf6 add link to own member details on the top right 2021-05-11 08:29:55 +02:00
Henry eaaed06fba add label to own entry in members list
Shows a green "this is you" label on the members list. Green because
that's also the color of the tag on the top right.

Also changes the color of the  moderator label from green to blue to be
less confusing.
2021-05-11 08:18: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