imp:web: cleanups; use --allow on Sandstorm (#834)
This commit is contained in:
parent
95d33f20f6
commit
795dbd97f8
@ -29,4 +29,4 @@ set -euo pipefail
|
|||||||
mkdir -p /var/lib/hledger
|
mkdir -p /var/lib/hledger
|
||||||
touch /var/lib/hledger/Ledger
|
touch /var/lib/hledger/Ledger
|
||||||
cd /var
|
cd /var
|
||||||
hledger-web --capabilities-header=X-Sandstorm-Permissions --serve --base-url='' -f /var/lib/hledger/Ledger --port 8000
|
hledger-web --allow=sandstorm --serve --base-url='' -f /var/lib/hledger/Ledger --port 8000
|
||||||
|
|||||||
@ -45,6 +45,11 @@ webflags =
|
|||||||
["serve-api"]
|
["serve-api"]
|
||||||
(setboolopt "serve-api")
|
(setboolopt "serve-api")
|
||||||
"like --serve, but serve only the JSON web API, without the server-side web UI"
|
"like --serve, but serve only the JSON web API, without the server-side web UI"
|
||||||
|
, flagReq
|
||||||
|
["allow"]
|
||||||
|
(\s opts -> Right $ setopt "allow" s opts)
|
||||||
|
"view|add|edit"
|
||||||
|
"set the user's access level for changing data (default: `add`). It also accepts `sandstorm` for use on that platform (reads permissions from the `X-Sandstorm-Permissions` request header)."
|
||||||
, flagReq
|
, flagReq
|
||||||
["cors"]
|
["cors"]
|
||||||
(\s opts -> Right $ setopt "cors" s opts)
|
(\s opts -> Right $ setopt "cors" s opts)
|
||||||
@ -75,11 +80,6 @@ webflags =
|
|||||||
(\s opts -> Right $ setopt "file-url" s opts)
|
(\s opts -> Right $ setopt "file-url" s opts)
|
||||||
"FILEURL"
|
"FILEURL"
|
||||||
"set the static files url (default: BASEURL/static)"
|
"set the static files url (default: BASEURL/static)"
|
||||||
, flagReq
|
|
||||||
["allow"]
|
|
||||||
(\s opts -> Right $ setopt "allow" s opts)
|
|
||||||
"view|add|edit"
|
|
||||||
"set the user's access level for changing data (default: `add`). (There is also `sandstorm`, used when running on Sandstorm.)"
|
|
||||||
, flagNone
|
, flagNone
|
||||||
["test"]
|
["test"]
|
||||||
(setboolopt "test")
|
(setboolopt "test")
|
||||||
|
|||||||
@ -96,7 +96,8 @@ serve them from another server for efficiency, you would set the url with this.
|
|||||||
|
|
||||||
`--allow=view|add|edit`
|
`--allow=view|add|edit`
|
||||||
: set the user's access level for changing data (default: `add`).
|
: set the user's access level for changing data (default: `add`).
|
||||||
(There is also `sandstorm`, used when running on the Sandstorm app platform.)
|
It also accepts `sandstorm` for use on that platform (reads
|
||||||
|
permissions from the `X-Sandstorm-Permissions` request header).
|
||||||
|
|
||||||
`--test`
|
`--test`
|
||||||
: run hledger-web's tests and exit. hspec test runner args may follow a --, eg: hledger-web --test -- --help
|
: run hledger-web's tests and exit. hspec test runner args may follow a --, eg: hledger-web --test -- --help
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user