mirror of
https://github.com/simonmichael/hledger.git
synced 2024-10-06 10:57:30 +03:00
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
|
||||
touch /var/lib/hledger/Ledger
|
||||
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"]
|
||||
(setboolopt "serve-api")
|
||||
"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
|
||||
["cors"]
|
||||
(\s opts -> Right $ setopt "cors" s opts)
|
||||
@ -75,11 +80,6 @@ webflags =
|
||||
(\s opts -> Right $ setopt "file-url" s opts)
|
||||
"FILEURL"
|
||||
"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
|
||||
["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`
|
||||
: 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`
|
||||
: 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