Items access rights check
To check current user access rights on items, use the command core/check_items_billing:
svc=core/check_items_billing¶ms={"items":[<long>],
"accessFlags":<long>,
"serviceName":<text>}
While processing a request, available services and access rights on items are checked. For example, a user has a right to create POIs in some resource, however, according to service's cost table, the limit of allowed POIs has been reached, so this resource will not be present in the result array.
Parameters
Response
[
<long> /* array of items that the user can access */
]
Access flags
General
Flag | Description |
0x0001 | View item and its basic properties |
0x0002 | View detailed item properties |
0x0004 | Manage access to this item |
0x0008 | Delete item |
0x0010 | Rename item |
0x0020 | View custom fields |
0x0040 | Manage custom fields |
0x0080 | Edit not mentioned properties |
0x0100 | Change icon |
0x0200 | Query reports or messages |
0x0400 | Edit ACL propagated items |
0x0800 | Manage item log |
0x1000 | View administrative fields |
0x2000 | Edit administrative fields |
0x4000 | View attached files |
0x8000 | Edit attached files |
Units and unit groups
Flag | Description |
0x0000100000 | Edit connectivity settings (device type, UID, phone, access password, messages filter) |
0x0000200000 | Create, edit, and delete sensors |
0x0000400000 | Edit counters |
0x0000800000 | Delete messages |
0x0001000000 | Execute commands |
0x0002000000 | Register events |
0x0004000000 | View connectivity settings (device type, UID, phone, access password, messages filter) |
0x0010000000 | View service intervals |
0x0020000000 | Create, edit, and delete service intervals |
0x0040000000 | Import messages |
0x0080000000 | Export messages |
0x0400000000 | View commands |
0x0800000000 | Create, edit, and delete commands |
0x4000000000 | Edit trip detector and fuel consumption |
0x8000000000 | Use unit in jobs, notifications, routes, retranslators |
Users
Flag | Description |
0x100000 | Manage user`s access rights |
0x200000 | Act as given user (create items, login, etc.) |
0x400000 | Change flags for given user |
0x800000 | View push messages for mobile app |
0x1000000 | Edit push messages |
Retranslators
Flag | Description |
0x100000 | Edit retranslator properties including start/stop |
0x200000 | Add or remove units from retranslator, change their UIDs |
Resources (Accounts)
Flag | Description |
0x0000000100000 | View notifications |
0x0000000200000 | Create, edit, and delete notifications |
0x0000000400000 | View POIs |
0x0000000800000 | Create, edit, and delete POIs |
0x0000001000000 | View geofences |
0x0000002000000 | Create, edit, and delete geofences |
0x0000004000000 | View jobs |
0x0000008000000 | Create, edit, and delete jobs |
0x0000010000000 | View report templates |
0x0000020000000 | Create, edit, and delete report templates |
0x0000040000000 | View drivers and driver groups |
0x0000080000000 | Create, edit, and delete drivers and driver groups |
0x0000100000000 | Manage account |
0x0000200000000 | View orders |
0x0000400000000 | Create, edit, and delete orders |
0x0100000000000 | View trailers and trailer groups |
0x0200000000000 | Create, edit, and delete trailers and trailer groups |
Routes
Flag | Description |
0x0000000100000 | Edit route properties |
Other
Flag | Description |
0xfffffffffffffff | Sets all possible access flags to an item |