kopia lustrzana https://github.com/OpenDroneMap/WebODM
Fixed permission nodes reference, added permissions page
rodzic
47425d2905
commit
6690341dfd
|
@ -1,36 +1,11 @@
|
|||
# Reference
|
||||
## Permissions
|
||||
|
||||
## Authentication
|
||||
WebODM comes with a standard `model level` permission system. You can
|
||||
check whether users are logged-in and have privileges to act on things
|
||||
model-wise (can a user add a project? can a user view projects?).
|
||||
|
||||
> Get authentication token:
|
||||
On top of that, WebODM features a powerful `row level` permission system. You can specify exactly which things a user has or has not access to, delete, change, etc.
|
||||
|
||||
```bash
|
||||
curl -X POST -d "username=testuser&password=testpass" http://localhost:8000/api/token-auth/
|
||||
Changes to the permissions of objects can be handled via the `Administration` page of WebODM.
|
||||
|
||||
{"token":"eyJ0eXAiO..."}
|
||||
```
|
||||
|
||||
> Use authentication token:
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: JWT <your_token>" http://localhost:8000/api/projects/
|
||||
|
||||
{"count":13, ...}
|
||||
```
|
||||
|
||||
`POST /api/token-auth/`
|
||||
|
||||
Field | Type | Description
|
||||
----- | ---- | -----------
|
||||
username | string | Username
|
||||
password | string | Password
|
||||
|
||||
To access the API, you need to provide a valid username and password. You can create users from WebODM's Administration page.
|
||||
|
||||
If authentication is successful, you will be issued a token. All API calls should include the following header:
|
||||
|
||||
Header |
|
||||
------ |
|
||||
Authorization: JWT `your_token` |
|
||||
|
||||
The token expires after a set amount of time. The expiration time is dependent on WebODM's settings. You will need to request another token when a token expires.
|
||||
We are planning to make it easier for users and developers to handle permissions via an API. This is a work in progress.
|
|
@ -32,7 +32,18 @@ port | int | Port
|
|||
api_version | string | Version of node-OpenDroneMap currently running
|
||||
last_refreshed | string | Date and time this node was last seen online. This value is typically refreshed every 15-30 seconds and is used to decide whether a node is offline or not
|
||||
queue_count | int | Number of [Task](#task) items currently being processed/queued on this node.
|
||||
available_options | JSON[] | JSON-encoded list of name/value pairs that represent the list of options that this node is capable of handling.
|
||||
available_options | JSON[] | JSON-encoded list of options that this node is capable of handling. See [Available Options](#available-options) for more information
|
||||
|
||||
|
||||
#### Available Options
|
||||
|
||||
Name | Description
|
||||
---- | -----------
|
||||
help | Description of the option
|
||||
name | Name that identifies the option. This is the value you pass in the `name` key/value pair when creating a set of options for a new [Task](#task)
|
||||
type | Possible values are `int`, `float`, `string`, `bool`
|
||||
value | Default value if the option is not specified
|
||||
domain | Restriction of the range of values that this option allows. Examples are `float`, `negative integer`, `percent`, `float: 0 <= x <= 10`, etc. for all possible values, check [node-OpenDroneMap's odmOptions.js code](https://github.com/OpenDroneMap/node-OpenDroneMap/blob/master/libs/odmOptions.js#L135)
|
||||
|
||||
|
||||
### Add a processing node
|
||||
|
|
|
@ -18,5 +18,6 @@ includes:
|
|||
- reference/project
|
||||
- reference/task
|
||||
- reference/processingnode
|
||||
- reference/permissions
|
||||
|
||||
---
|
||||
|
|
Ładowanie…
Reference in New Issue