1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-02 22:05:37 +02:00

127 lines
2.9 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 20
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Check task acesses for users
Checks the availability of the task for users
`Function CheckTaskAccesses(Val URL, Val TaskID, Val Users = "", Val Token = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| URL | --url | String | URL of webhook or a Bitrix24 domain, when token used |
| TaskID | --task | Number, String | Task ID |
| Users | --users | Array of String | User IDs for access checking |
| Token | --token | String | Access token, when app auth method used |
Returns: Map Of KeyAndValue - serialized JSON of answer from Bitrix24 API
<br/>
:::tip
Method at API documentation: [tasks.task.getaccess](https://dev.1c-bitrix.ru/rest_help/tasks/task/tasks/tasks_task_getaccess.php)
:::
<br/>
```bsl title="Code example"
ArrayOfUsers = New Array;
ArrayOfUsers.Add("1");
ArrayOfUsers.Add("10");
URL = "https://b24-ar17wx.bitrix24.by/rest/1/1o2...";
TaskID = "2446";
Result = OPI_Bitrix24.CheckTaskAccesses(URL, TaskID, ArrayOfUsers);
URL = "b24-ar17wx.bitrix24.by";
Token = "21750a67006e9f06006b12e400000001000...";
TaskID = "2448";
Result = OPI_Bitrix24.CheckTaskAccesses(URL, TaskID, ArrayOfUsers, Token);
```
```json title="Result"
{
"result": {
"allowedActions": {
"1": {
"ACCEPT": false,
"DECLINE": false,
"COMPLETE": true,
"APPROVE": false,
"DISAPPROVE": false,
"START": true,
"PAUSE": false,
"DELEGATE": true,
"REMOVE": true,
"EDIT": true,
"DEFER": true,
"RENEW": false,
"CREATE": true,
"CHANGE_DEADLINE": true,
"CHECKLIST_ADD_ITEMS": true,
"ADD_FAVORITE": true,
"DELETE_FAVORITE": false,
"RATE": true,
"EDIT.ORIGINATOR": false,
"CHECKLIST.REORDER": true,
"ELAPSEDTIME.ADD": true,
"DAYPLAN.TIMER.TOGGLE": false,
"EDIT.PLAN": true,
"CHECKLIST.ADD": true,
"FAVORITE.ADD": true,
"FAVORITE.DELETE": false
},
"10": {
"ACCEPT": false,
"DECLINE": false,
"COMPLETE": false,
"APPROVE": false,
"DISAPPROVE": false,
"START": false,
"PAUSE": false,
"DELEGATE": false,
"REMOVE": false,
"EDIT": false,
"DEFER": false,
"RENEW": false,
"CREATE": true,
"CHANGE_DEADLINE": false,
"CHECKLIST_ADD_ITEMS": false,
"ADD_FAVORITE": false,
"DELETE_FAVORITE": false,
"RATE": false,
"EDIT.ORIGINATOR": false,
"CHECKLIST.REORDER": false,
"ELAPSEDTIME.ADD": false,
"DAYPLAN.TIMER.TOGGLE": false,
"EDIT.PLAN": false,
"CHECKLIST.ADD": false,
"FAVORITE.ADD": false,
"FAVORITE.DELETE": false
}
}
},
"time": {
"start": 1728454785.80063,
"finish": 1728454785.85694,
"duration": 0.0563130378723144,
"processing": 0.0311760902404785,
"date_start": "2024-10-09T09:19:45+03:00",
"date_finish": "2024-10-09T09:19:45+03:00",
"operating_reset_at": 1728455385,
"operating": 0
}
}
```