1

Presets access rights

(10/08/2017 14:50:31 отредактировано prabhu.janakiraman)

Тема: Presets access rights

How to fetch Presets of access rights for unit, unit groups, resource, user etc.  Currently I'm using below API to create / update presets Templates.

Is there any RemoteAPI to fetch these Presets with Name and acl pair?. e.g..Name :  Account Admin ; acl : 567795534839


item/update_custom_property
params:{"itemId":*****,"name":"access_templates",
"value":
"{\"avl_unit\":[
{\"id\":0,\"name\":\"No access\",\"color\":\"rgb(255, 217, 191)\",\"acl\":0},
{\"id\":1,\"name\":\"Full access\",\"color\":\"rgb(211, 191, 229)\",\"acl\":-1},
{\"id\":2,\"name\":\"Read only\",\"color\":\"rgb(191, 212, 242)\",\"acl\":16931},
{\"id\":3,\"name\":\"Account Admin\",\"acl\":567795534839,\"color\":\"rgb(202, 229, 191)\"},
{\"id\":4,\"name\":\"Account Supervisor\",\"acl\":550615647217,\"color\":\"rgb(191, 242, 242)\"},
{\"id\":5,\"name\":\"Account User\",\"acl\":550598888321,\"color\":\"rgb(232, 201, 162)\"}],
\"avl_unit_group\":[],\"avl_resource\":
[{\"id\":0,\"name\":\"No access\",\"color\":\"rgb(255, 217, 191)\",\"acl\":0},
{\"id\":1,\"name\":\"Full access\",\"color\":\"rgb(211, 191, 229)\",\"acl\":-1},
{\"id\":2,\"name\":\"Read only\",\"color\":\"rgb(191, 212, 242)\",\"acl\":16931},
{\"acl\":52909688507383,\"name\":\"Admin\",\"color\":\"rgb(202, 229, 191)\",\"id\":3}],
\"avl_route\":[],
\"user\":[]}"}

Thanks
J Prabhu
2

Presets access rights

Re: Presets access rights

prabhu.janakiraman, hello.
All these presets for all item types are stored in one custom property "access_templates". Thus there is no opportunity to fetch access templates for some special item type or to get templates with specified name or acl. You should manually filter json data after fetching it from custom property.
And the same thing when you update templates - you should replace only affected templates and leave untouched the others.

Head of Wialon Local Department
Gurtam
3

Presets access rights

(11/08/2017 08:18:32 отредактировано prabhu.janakiraman)

Re: Presets access rights

Thank you for your response. Which Remote API is used to get custom property "access_templates" ?

Thanks
J Prabhu
4

Presets access rights

Re: Presets access rights

prabhu.janakiraman, this is user's custom property. All user's custom propperties are returned after login in "prp" property of user.
Also user's custom properties can be fetched with the help of core/search_item request. You should pass 0x00000002    (2) data flag - custom properties.

Head of Wialon Local Department
Gurtam