Commit Graph

315 Commits

Author SHA1 Message Date
Henry
56ef07d9f2
Merge pull request #30 from ssb-ngi-pointer/bring-back-dev-mode
Bring back dev mode
2021-02-22 16:56:03 +01:00
Henry
67597d9f8a turn template evaluation error fatal
this shouldn't just be logged and discarded as "not logged in"
2021-02-22 16:29:05 +01:00
Henry
af53bf71f5 comment broken back href 2021-02-22 16:25:13 +01:00
Henry
73471b5ff6 update http/render 2021-02-22 16:20:26 +01:00
Henry
9c0d4c9fd4 check for properly rendered error page 2021-02-22 16:13:20 +01:00
Henry
cea1e62207 fix template paths in sub-page tests 2021-02-22 16:02:55 +01:00
Henry
094ce57b9e github actions: bump go version to 1.16 2021-02-22 15:55:59 +01:00
Henry
ccd3612124 add dev mode to i18n 2021-02-22 15:51:58 +01:00
Henry
d774056f29 establish old asset paths 2021-02-22 15:51:58 +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
f0e61e7189 add back dev build tag for local file access without embedding 2021-02-22 15:51:55 +01:00
Henry
b5330884ab move inline style tag to seperate file
also the assets paths they are a little different after #26
2021-02-22 15:13:16 +01:00
Henry
abb4a0f627 leftover 2021-02-22 15:12:51 +01:00
Henry
1787a27898
Merge pull request #27 from ssb-ngi-pointer/prettify-templates
improve styles of template containers and sign-in
2021-02-22 15:09:24 +01:00
Andre Staltz
143b910f9f improve styles of template containers and sign-in 2021-02-22 14:57:45 +01:00
Henry
9dc77132ab
Merge pull request #26 from ssb-ngi-pointer/go1.16-embed
Go1.16 embed (fixes #20)
2021-02-22 14:51:40 +01:00
Henry
534691b639 change template paths for embed.FS 2021-02-22 14:49:11 +01:00
Henry
5829cb1197 migrate migrations
had to patch the upstream dependency, nothing too big though. Expecting
a merge after some small backwards compat discussion.
2021-02-22 14:49:11 +01:00
Henry
c0efc3d1fa convert i18n defaults to embed 2021-02-22 14:49:11 +01:00
Henry
dd575aa0c7 use embed package of go1.16 for embedding assets (fixes #20) 2021-02-22 14:48:45 +01:00
Henry
448f681acb
Merge pull request #25 from ssb-ngi-pointer/csrf-and-csp
CSRF and CSP
2021-02-22 14:44:49 +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
aefa2a266c update login test to do the csrf dance
also: use pre-release of http/tester with better header handling
2021-02-22 14:19:21 +01:00
Henry
56daccbb4b fix session lifetime 2021-02-17 12:22:05 +01:00
Henry
f1f4e9dcb9 add CSRF protection
updates #14
2021-02-17 12:22:05 +01:00
Henry
c3286fb5da
Merge pull request #22 from ssb-ngi-pointer/allow-list
Allow list
2021-02-17 12:21:14 +01:00
Henry
60ca1bfb37 fix redirect 2021-02-16 12:33:25 +01:00
Henry
9b0c9580d1 Change userfacing term allow-list to member(s) 2021-02-16 11:56:11 +01:00
Henry
412545ac50 small fixes
* news/overview was still using PostID
* fix singular in testing {{ i18npl ... }}
2021-02-16 10:33:28 +01:00
Henry
cb0339c688 update templates 2021-02-15 18:59:44 +01:00
Henry
b82ff3051a add test for remove 2021-02-15 18:54:00 +01:00
Henry
29d884b4fc allow-list: add test for add 2021-02-15 18:26:20 +01:00
Henry
ae5f25a710 allow-list: add test for presence of remove link 2021-02-15 17:21:25 +01:00
Henry
a528002361 cleanup internal sqlite error 2021-02-15 17:21:06 +01:00
Henry
4ecee3739e internal/broadcasts: fix test fluke
I'm not 100% sure how this ever passed so often. range over a map is
guaranteed to be random per the language spec. Not sure if this is
different for pointers but I'd be supprised.

Well, now this is testing the right things directly at least and doesn't
depend on the order of the output.
2021-02-15 15:26:50 +01:00
Henry
9dcab464cb small cleanup 2021-02-15 15:08:34 +01:00
Henry
4d62c46e29 web/admin: update i18n labels 2021-02-15 14:44:00 +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
d802294418 admindb: add GetByID to AllowListService 2021-02-15 14:43:55 +01:00
Henry
ecc11f8bc4 admindb: change list interface to also work with IDs 2021-02-15 14:43:55 +01:00
Henry
6416d1c215 allow list interface 2021-02-15 14:43:32 +01:00
André Staltz
98dc808f87
Merge pull request #21 from ssb-ngi-pointer/fix-fouc
fix css flash-of-unstyled-content
2021-02-15 11:24:56 +02:00
Andre Staltz
0eb957dbb8
fix css flash-of-unstyled-content 2021-02-12 17:34:20 +02:00
Henry
8174c3fc46
Merge pull request #18 from ssb-ngi-pointer/fix-logging
setup logging in http handlers (fixes #10)
2021-02-12 10:51:17 +01:00
Henry
dc52d7af58
Merge pull request #19 from ssb-ngi-pointer/frontend-css-tweaks
setup Tailwind css project in web/styles
2021-02-12 10:50:56 +01:00
Henry
884750811a fix landing page tests 2021-02-12 10:47:51 +01:00
Henry
9019ebd130 just one /style.css
use 'go generate -tags dev' to produce the dev build and 'go generate'
for the prod build. have them produce the same file.

The only problem is that one needs to run this in web/styles first
before updating assets.
2021-02-11 18:37:51 +01:00
Andre Staltz
8401472b8f
setup Tailwind css project in web/styles 2021-02-11 18:30:16 +02: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
fe26d62ce1
Merge pull request #17 (web-room-bridge) - Fixes #9
web room bridge
2021-02-11 16:43:03 +01:00