mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-28 05:04:15 -05:00
extend POST /users/:id
Now you can set a password for a user while the server is running,
e.g. via the following command:
```shell
curl \
-H 'Content-Type: application/json' \
-d '{"update": {"password": "asdf"}}' \
--unix-socket /var/lib/moonfire-nvr/sock \
http://nvr/api/users/1
```
This commit is contained in:
@@ -95,6 +95,9 @@ pub struct Permissions {
|
||||
|
||||
#[serde(default)]
|
||||
update_signals: bool,
|
||||
|
||||
#[serde(default)]
|
||||
admin_users: bool,
|
||||
}
|
||||
|
||||
impl Permissions {
|
||||
@@ -103,6 +106,7 @@ impl Permissions {
|
||||
view_video: self.view_video,
|
||||
read_camera_configs: self.read_camera_configs,
|
||||
update_signals: self.update_signals,
|
||||
admin_users: self.admin_users,
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user