Commit Graph

87 Commits

Author SHA1 Message Date
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
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
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
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
Tim Nordenfur 18320f9ed7 expand member entry when aliases overflow (#250) 2021-06-10 00:44:48 +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 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 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 653d0926f7 add password change form 2021-05-11 10:16:35 +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
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
cblgh 0574c9a235 test language picking 2021-04-20 09:22:53 +02:00
cblgh c97b7d44c3 add default language admin ui functionality 2021-04-20 09:22:49 +02:00
Henry 52ec94e878 fix link generation for alias registration
fixes #160
2021-04-19 15:00:35 +02:00
Andre Staltz fb8c20fffe
update TestMembers to check for roles 2021-04-16 14:43:35 +03:00
Andre Staltz 8a7ffee4b5
member-list.tmpl uses string comparison, not magic enum numbers 2021-04-16 14:25:32 +03:00
Andre Staltz f6a24921eb
show admin and moderator tags on members list 2021-04-16 13:09:59 +03:00
Andre Staltz 6b082c45f7
more content and member links on the dashboard 2021-04-15 16:24:57 +03:00
Henry 8ff4adf160 various fixes
* fix test compilation
* fix aliases on member page
* add tests for aliases on member.GetByID and ByFeed
* fix admin tests
* use webassert helper for flash messages
* fix flashes
2021-04-12 14:10:42 +02:00
Henry 60010a7787 use flashes for notice edits 2021-04-12 14:09:09 +02:00
Henry cec7bc0e44 add flash message helper 2021-04-12 14:09:09 +02:00
cblgh 22a2348187 create /settings, move privacy modes ui into it 2021-04-12 13:42:31 +02:00
Alexander Cobleigh ff028699d2
Apply suggestions from code review
Co-authored-by: André Staltz <andre@staltz.com>
2021-04-09 14:35:06 +02:00
cblgh ac1ede43be clean up privacy mode logic 2021-04-09 13:50:15 +02:00
cblgh 092ce82ab1 wip logic for setting privacy modes 2021-04-09 13:25:40 +02:00
cblgh 99f168e81e add english translations 2021-04-08 15:42:22 +02:00
cblgh b79d46d36e remake grid using tailwind 2021-04-08 15:42:22 +02:00
cblgh 3c75fcc6b0 start styling privacy modes ui 2021-04-08 15:42:22 +02:00
Andre Staltz 67877407b8
restyle the invites page 2021-04-08 13:10:45 +03:00
André Staltz aeb0f9f824
Merge pull request #123 from ssb-ngi-pointer/style-members3
combine aliases page with members page
2021-04-08 11:58:03 +03:00
Andre Staltz 60c0b36f04
add tests for member-details 2021-04-07 14:58:31 +03:00
Andre Staltz 4f70c62ab2
combine aliases page with members page 2021-04-07 14:38:03 +03:00
Henry 01cd99b3e6 fix dashboard styling and invite count 2021-04-07 09:54:33 +02:00
Andre Staltz 08c8b0cced
style the join (claim invite) pages 2021-03-30 18:04:07 +03:00
Andre Staltz 371109c136
style the admin/invite-created template 2021-03-30 17:38:52 +03:00
Andre Staltz 6ee11a3fce
add Count() to Members, Invites, DeniedKeys 2021-03-30 11:50:13 +03:00
Andre Staltz a9027250d3
update tests for new dashboard template 2021-03-30 11:49:22 +03:00
Andre Staltz 313405d469
style the dashboard template 2021-03-30 11:49:21 +03:00
Henry 377f3512a2 remove member nickname and alias suggestion
insert-user: remove nickname
2021-03-29 15:53:33 +02:00
Henry d1d108b9b7 Add support for invite consumption via JSON 2021-03-29 15:53:30 +02:00
Henry 4325e0fb3d various fixes
* fill in sid and sc
* fix logout
* cascade member removal
* fix links
* trim suffix from signature
* fix /sse/login link
* fix sse links and filenames
* fix logout
* fix typos
* fix test compilation
* fix bridge test
* correct alias url test
* add some comments
* fix potentiall "can't send" deadlock on bridge

some documentation and license headers
2021-03-26 13:45:17 +01:00
Henry 4f723ab050 dashboard: change user roles
* implement SetRole on sqlite
* add dropdown form to members table
* add http endpoint for processing
* Add comment to denied keys overview
* update ban remove confirm page
2021-03-22 13:02:39 +01:00
Henry fdedccfc8b more denied-keys fixes 2021-03-22 13:02:39 +01:00
Henry 1b6f7f5006 add denied templates and handlers
copy of previous allow-list stuff
2021-03-22 13:02:39 +01:00
Henry 92a6dcfb55 web/handlers/admin overhaul 2021-03-22 12:59:52 +01:00
Andre Staltz 6509cdeeef
change datetime format in invite-list.tmpl tooltip to ISO 8601 2021-03-17 13:12:30 +02:00
Andre Staltz 8f63eb0abb
change datetime format in invite-list.tmpl tooltip to ISO 8601 2021-03-17 13:12:26 +02:00
Andre Staltz 4c007d3cd0
tweak paddings and widths in invite-list.tmpl 2021-03-17 13:06:28 +02:00