118c34dac6
go: fix csrf issues
continuous-integration/drone/push Build is passing
2023-08-03 14:49:21 +02:00
044ed583b9
go: set global default {read,write} timeouts
continuous-integration/drone/push Build is passing
2023-08-03 14:40:04 +02:00
5f8548958f
go: add usr updating [wip]
continuous-integration/drone/push Build is passing
2023-06-02 20:00:14 +02:00
32aa8d8852
go: add+enable compression middleware
continuous-integration/drone/push Build is passing
2023-05-31 22:42:50 +02:00
5cf5ba51bc
go: enable HEAD method for some routes
continuous-integration/drone/push Build is passing
2023-05-31 22:32:25 +02:00
ffc9b74c75
go: add a simple caching middleware for assets
continuous-integration/drone/push Build is passing
2023-05-31 22:29:52 +02:00
dbd0e9d01d
go: implement session auth middleware
...
continuous-integration/drone/push Build is passing
* simplify protection of endpoints
* role discernment still occures in respective handlers
* db client needs to be passed into handlers as a global var now
2023-05-30 23:50:37 +02:00
ae5c4f1dd4
go,tmpl: add usr details listing
...
continuous-integration/drone/push Build is passing
* add tmpl
* add handler for route /manage/user/:id
* add convenience helper func
* handle not found/invalid uuid errors
2023-05-29 22:42:18 +02:00
ff68a7dbe3
go: fix port default,flag handling
continuous-integration/drone/push Build is passing
2023-05-23 16:37:33 +02:00
547f6e7b3c
add user creation
continuous-integration/drone/push Build is passing
2023-05-22 06:47:33 +02:00
97ea29d043
add user listing
continuous-integration/drone/push Build is passing
2023-05-22 03:22:58 +02:00
6ce05ea74d
feat: add initial admin user creation
...
continuous-integration/drone/push Build is passing
have the app create the initial admin user:
* if the db has not yet been set up
* if there are not users
* if the config value for Init.CreateAdmin is True
* if the admin password is not empty
default username, email values can be seen in modules/user/const.go
2023-05-21 18:50:41 +02:00
9eb811169d
feat: bump configuration schema to 0.0.1-rc.2
...
continuous-integration/drone/push Build is passing
this entails a couple of breaking changes due to schema evolution. once
the schema is stabilised, backward compatibility promise will be given.
* update config struct and accompanying scructs
* update tests
* update exampleConfig.dhall
* update local dev environment (devenv)
* make settings reflect the config schema changes
* make use of some settings/config updates
2023-05-21 12:44:18 +02:00
3a2f85f683
feat: add license headers (+spdx id)
continuous-integration/drone/push Build is passing
2023-05-20 20:15:57 +02:00
72723d951d
go(refactor): clean up run.go
continuous-integration/drone/push Build is passing
2023-05-17 20:40:24 +02:00
31ab083f8a
handlers: add health-check endpoints
continuous-integration/drone/push Build is passing
2023-05-13 22:33:38 +02:00
fc4460d5e1
go: delete pertinent ENVs after loading settings
continuous-integration/drone/push Build is passing
2023-05-12 22:43:36 +02:00
e8ac4e39ce
modules/funcmap: add funcs to calculate SRI hashes
...
continuous-integration/drone/push Build is passing
* correctly handle LiveMode resp. whether or not to set/read embeds
2023-05-12 00:11:23 +02:00
1fb7479d8e
slogger: rename Logger to Slogger
continuous-integration/drone/push Build is passing
2023-05-11 17:06:20 +02:00
9bbfbe923e
app: set debug lvl also to gommon Echo logger
continuous-integration/drone/push Build is passing
2023-05-11 04:48:24 +02:00
741af20b6e
app: call logger consistently
continuous-integration/drone/push Build is passing
2023-05-11 04:45:33 +02:00
bef3cb228e
app(logger): restore the old behaviour
...
continuous-integration/drone/push Build is passing
that is - have the Logger() method return pointer to the local (s)logger
2023-05-11 04:42:38 +02:00
122ea638c9
go: refactor template rendering
...
continuous-integration/drone/push Build is passing
* create pkg 'modules/template'
* move template rendering code from 'handlers' to 'modules/template'
* update call sites
* walk the 'templates' dir to discover nested hierarchies
* solidify LiveMode handling (vs embedded assets)
* break out funcMap to it's own file
* general clean-up
2023-05-11 04:32:39 +02:00
61760fa373
app/assets.go: add info on what path failed
continuous-integration/drone/push Build is passing
2023-05-11 03:09:12 +02:00
813d0c233e
echo settings: enable rate-limiting
continuous-integration/drone/push Build is passing
2023-05-10 17:48:02 +02:00
a879704535
go: partially rework how slogging works
continuous-integration/drone/push Build is passing
2023-05-09 17:35:00 +02:00
df0c280ad1
go: redo asset handling
...
continuous-integration/drone/push Build is passing
* only embed substructure of assets
* create subfolders for css, imgs
* add .gitattributes file specifying pcmt.css as generated (by tailwind)
2023-05-08 00:13:33 +02:00
9dbc475145
go: implement the Echo renderer for templates
continuous-integration/drone/push Build is passing
2023-05-06 21:50:35 +02:00
eafc9c1e92
go,tmpl: conditionally show content to users
continuous-integration/drone/push Build is passing
2023-05-06 00:03:41 +02:00
0a34bca1c1
go: allow choosing db type, setting connstr
continuous-integration/drone/push Build is passing
2023-05-05 23:10:56 +02:00
f1bb52c58f
go: add a setting val for whether db is set up
continuous-integration/drone/push Build is passing
2023-05-05 22:58:13 +02:00
bfafc4a8be
config: update schema
...
continuous-integration/drone/push Build is passing
* couple session-related attrs in a record
* couple logger-pertaining attrs in a record
* update config Go representation
* update Go config consumers
2023-05-05 19:31:43 +02:00
746eb82f67
go: make sure flags are properly checked
continuous-integration/drone/push Build is passing
2023-05-04 21:28:30 +02:00
9fd55dbc0b
app: pre-declare errors
continuous-integration/drone/push Build is passing
2023-05-04 16:38:15 +02:00
38f72825e0
app: switch a couple of Info statements to Debug
continuous-integration/drone/push Build is passing
2023-05-04 16:35:41 +02:00
0a5d4e7d30
go: use enttest in tests
continuous-integration/drone/push Build is passing
2023-05-03 23:21:47 +02:00
d83a4bbc4c
rename app/startup.go to app/echoSettings.go
continuous-integration/drone/push Build is passing
2023-05-03 02:37:04 +02:00
258d9a5352
fix: set develMode again
continuous-integration/drone/push Build is passing
2023-05-03 02:35:35 +02:00
066d5da42f
chore: rm empty app/config.go [skip ci]
2023-05-03 02:26:24 +02:00
c4d0cb209b
go: add settings struct
...
continuous-integration/drone/push Build is passing
* let the settings struct be the single source of truth
* rm app fields that are covered by settings
* pass around a pointer to settings instead of config
* consolidate config+flags into settings on start-up
* update tests
* rm empty settings.go file
fixes #4
2023-05-03 02:18:29 +02:00
593454d616
go: add user email handling + improve sessions
...
continuous-integration/drone/push Build is passing
* add Email field to User entity (+codegen)
* switch to Echo contrib sessions backed by Gorilla sessions
* use SessionCookieSecret value from the config
* stage mod,sum changes
* add clearer signup/signin redirect logic
* render error pages on 500/404s and only fall back to returning raw
errors when the error is some unexpected kind
* add username/email "exists" funcs+tests - handle "not found" and "not
unique" errors, return errors otherwise
2023-05-01 22:48:11 +02:00
61ec8bfea1
app: add routes_test.go
continuous-integration/drone/push Build is passing
2023-05-01 15:48:53 +02:00
1d421465f5
go: have a dynamic {asset,tmpl}Path
...
continuous-integration/drone/push Build is passing
* handle errors more specifically when loading assets/tmpls
2023-04-28 23:16:58 +02:00
ba869f9a65
app: handle global debug mode better
continuous-integration/drone/push Build is passing
2023-04-28 23:05:32 +02:00
3cb2da457e
routes: change 303 -> 301 for /static -> /assets
...
continuous-integration/drone/push Build is passing
* should enable users' browsers to make use of the status code and cache
the redirect (in case anybody accesses the older version of the app
and hits /static)
2023-04-28 19:07:43 +02:00
bde8cfc88e
fix: properly redirect /static/* to /assets/*
continuous-integration/drone/push Build is passing
2023-04-27 17:43:34 +02:00
d99d86a2be
go(app): use embedded variable value
continuous-integration/drone/push Build is passing
2023-04-26 23:11:58 +02:00
8c7c84f6f9
go: rm deadcode from app/routes.go
continuous-integration/drone/push Build is passing
2023-04-26 23:05:48 +02:00
1655d6b792
go: /static -> /assets in varnames,routes,dirs
continuous-integration/drone/push Build is passing
2023-04-26 22:44:18 +02:00
5b63997aaf
app: clarify log msg [skip ci]
2023-04-20 13:23:48 +02:00