mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-05 07:12:34 -05:00
make GET /api/ return current permissions
This is useful for e.g. deciding whether or not to present the user admin UI in navigation. As part of this change, I adjusted the casing in Permissions, and then all the toml stuff for consistency. Noted in changelog.
This commit is contained in:
@@ -295,11 +295,11 @@ You'll also need a `/etc/moonfire-nvr.toml`:
|
||||
```toml
|
||||
[[binds]]
|
||||
ipv4 = "0.0.0.0:8080"
|
||||
allow_unauthenticated_permissions = { view_video = true }
|
||||
allowUnauthenticatedPermissions = { viewVideo = true }
|
||||
|
||||
[[binds]]
|
||||
unix = "/var/lib/moonfire-nvr/sock"
|
||||
own_uid_is_privileged = true
|
||||
ownUidIsPrivileged = true
|
||||
```
|
||||
|
||||
Note this configuration is insecure. You can change that via replacing the
|
||||
|
||||
@@ -71,11 +71,11 @@ $ sudo chmod a+rx /usr/local/bin/nvr
|
||||
```toml
|
||||
[[binds]]
|
||||
ipv4 = "0.0.0.0:8080"
|
||||
allow_unauthenticated_permissions = { view_video = true }
|
||||
allowUnauthenticatedPermissions = { viewVideo = true }
|
||||
|
||||
[[binds]]
|
||||
unix = "/var/lib/moonfire-nvr/sock"
|
||||
own_uid_is_privileged = true
|
||||
ownUidIsPrivileged = true
|
||||
```
|
||||
|
||||
`/usr/local/bin/nvr`:
|
||||
|
||||
@@ -165,13 +165,13 @@ If you follow the recommended Docker setup, your `/etc/moonfire-nvr.json`
|
||||
will contain this line:
|
||||
|
||||
```toml
|
||||
allow_unauthenticated_permissions = { view_video = true }
|
||||
allowUnauthenticatedPermissions = { viewVideo = true }
|
||||
```
|
||||
|
||||
Replace it with the following:
|
||||
|
||||
```toml
|
||||
trust_forward_headers = true
|
||||
trustForwardHeaders = true
|
||||
```
|
||||
|
||||
This change has two effects:
|
||||
|
||||
Reference in New Issue
Block a user