Commit Graph

39 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
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
Henry 81c05a663d Support open invites (fixes #102) 2021-05-17 10:16:26 +02:00
Henry 653d0926f7 add password change form 2021-05-11 10:16:35 +02:00
cblgh c97b7d44c3 add default language admin ui functionality 2021-04-20 09:22:49 +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
cblgh 22a2348187 create /settings, move privacy modes ui into it 2021-04-12 13:42:31 +02:00
cblgh ac1ede43be clean up privacy mode logic 2021-04-09 13:50:15 +02:00
Andre Staltz 4f70c62ab2
combine aliases page with members page 2021-04-07 14:38:03 +03:00
Andre Staltz 08c8b0cced
style the join (claim invite) pages 2021-03-30 18:04:07 +03:00
Henry d1d108b9b7 Add support for invite consumption via JSON 2021-03-29 15:53:30 +02:00
Andre Staltz 09fcd573b4 style all the sign-in pages 2021-03-26 18:16:26 +01:00
Henry 7eeca8533d add tests for SSE-powered login
* add test for sse login
* add test for invalid solution
2021-03-26 13:45:21 +01:00
Henry e9883a049b various fixes 2021-03-26 13:45:21 +01:00
Henry 3b092885fb cleanup 2021-03-26 13:45:21 +01: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 a180c74c38 begin sign-in with ssb
* sketch session store
* use session store and unify authentication handling
* sketch muxrpc handlers
2021-03-26 13:36:42 +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 92a6dcfb55 web/handlers/admin overhaul 2021-03-22 12:59:52 +01:00
Henry b9bcbb42ec alias JSON endpoint and testing 2021-03-16 08:49:58 +01:00
Henry 50e4ebbaca aliases: add overview and revoke handlers 2021-03-16 08:49:47 +01:00
Henry 98468e93a5 Invite endpoints
* Add revoke and created templates
* Render invite accept with domain
* Flesh out accept page
2021-03-10 09:33:55 +01:00
Henry c7bcef4339 invite form testing 2021-03-10 09:33:15 +01:00
Henry d22996c24d rm news 2021-02-25 11:22:15 +01:00
Henry 99e56dbcbf re-use edit template for new translation 2021-02-25 11:13:48 +01:00
Henry 1ec3e8b064 list, set and get pinned notices 2021-02-25 10:07:47 +01:00
Henry e5a07fd8bc (Pinned)Notices
Notices are pages that admins can fill with their content to describe
and customize the room.

Pinned notices are common notices that each room has. Like a description
and privacy policy.

* update models
* simple crud test for basic notices
* edit and save notices as admin
2021-02-25 10:07:44 +01:00
Andre Staltz eaf4a4447c
new route "menu" that is accessible on mobile only 2021-02-24 12:08:21 +02:00
Henry 9b0c9580d1 Change userfacing term allow-list to member(s) 2021-02-16 11:56:11 +01:00
Henry 29d884b4fc allow-list: add test for add 2021-02-15 18:26:20 +01:00
Henry 58f795d5e6 route with query params instead of named routers
Since we don't use the web/router through and through to setup handler
functions, accessing the named route varaibles doesn't work inside those
handler functions.

Since I dont find it acceptable to juggle two concepts here I switch the
url generation to classical get query paramters (route?varA=xyz&varB=2).
2021-02-15 14:43:55 +01:00
Henry 6416d1c215 allow list interface 2021-02-15 14:43:32 +01:00
Henry 431e917fd2 eliminate global state in handlers/http_test.go 2021-02-11 15:34:03 +01:00
Henry 0a44d19b4b add missing license headers 2021-02-09 12:53:33 +01:00
Henry 743de1d1f6 add simple authenticated navigation
{{is_logged_in}} returns a *admindb.User value or nil depending on their
state. This can be used to build conditional rendering.
2021-02-09 12:39:57 +01:00
Henry 01ed66d6df basic auth middleware setup 2021-02-08 13:02:45 +01:00
Henry fdf11f9a23 start http and html skelleton 2021-02-04 11:36:02 +01:00