Commit Graph

34 Commits

Author SHA1 Message Date
Henry
396961e5e8 implement bridge between muxrcp and http 2021-03-26 13:36:48 +01:00
Henry
afa6bee285 add server-sent events handler 2021-03-26 13:36:48 +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
0065312db1 change muxrpc room.registerAlias to return the resolve URL 2021-03-23 16:50:25 +01:00
Henry
a0be3e998b various fixes 2021-03-22 13:02:39 +01:00
Henry
36d46a8576 fix denied list in sqlite 2021-03-22 13:02:39 +01:00
Henry
a9e7297f64 update cmd/server 2021-03-22 13:02:39 +01:00
Henry
1cc5cb435d fix cmd/server build 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
38da82980e fix builds 2021-03-16 08:49:40 +01:00
Henry
117cad48a7 rename admindb to roomdb 2021-03-10 16:44:46 +01:00
Henry
b95c8de8be add room v1 "invite" until we have ssb-uri finalized 2021-03-10 09:35:54 +01:00
Henry
fd21dfc60a Various fixes
* fix accept and consumed view
* Apply suggestions from Alex' code review
* define admin.Databases options struct
* structify database parameters of web/handlers
2021-03-10 09:34:36 +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
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
Henry
8285c68417 remove -development falg from server cli
use -tags dev like we do in the rest of the code
2021-02-22 15:51:58 +01:00
Henry
6a4c1e54d9 add default CSP and some other browser mitigations
Though, CSP is primarily a tool against cross-site scripting and we
don't plan to host any user-generated or 3rd party content it's still a
good practice.  The primary requirment with this rule is
 to move all inline style tags to a seperate file.
2021-02-22 14:39:45 +01:00
Henry
6416d1c215 allow list interface 2021-02-15 14:43:32 +01:00
Henry
99c2e95aa3 setup logging in http handlers (fixes #10)
in a http.Handler you can now do the following to log events:

logger := logging.FromContext(req.Context())
level.Info(logger).Log("event", "happend", ...)
2021-02-11 16:43:37 +01:00
Henry
beea19f93e seperate room state from muxrpc handler
There is a new roomstate package now with a Manager which is shared between muxrpc and the http
handler(s).

Also adds a list of peers in the room to admin dashboard.
2021-02-11 15:30:51 +01:00
Henry
fec92d428c change name to go-ssb-room
It has been brought to my attention that "gossb" reads like "gossip..?"
to the untrained eye. That's just confusing.

Also the project hosts a single room so the plural was just wrong.
2021-02-09 17:38:51 +01:00
Henry
830678c914 admindb: add migrations based on rubenv/sql-migrate
This removes the nasty need for creating the database manually.

Migrations are kept in an embedded filesystem, just like the templates
and assets for the web frontend. The same -tags dev trick applies for
them.
2021-02-09 16:49:48 +01:00
Henry
ef4a2f3f22 sqlite and auth setup 2021-02-08 17:47:42 +01:00
Henry
01ed66d6df basic auth middleware setup 2021-02-08 13:02:45 +01:00
Henry
e9013a0c6b change import path
this is part of the NGI work and should be clearly indicated as such
2021-02-04 16:54:30 +01:00
Henry
f741065836 add i18n support
TODO: default files once embedded assets are there
2021-02-04 16:52:55 +01:00
Henry
0a67bf690b some cleanup and a Readme 2021-02-04 14:13:52 +01:00
Henry
fdf11f9a23 start http and html skelleton 2021-02-04 11:36:02 +01:00
Henry
668e3dd766 simple authorized_keys file 2021-01-28 15:06:51 +01:00
Henry
b176ff51c4 whoops 2021-01-25 18:41:36 +01:00
Henry
6b90c96a5d room sever skeleton 2021-01-25 13:50:51 +01:00
Henry
f325ed5cf3 init 2021-01-25 11:39:05 +01:00