cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Setting permissions to many things using a service.

Tomellache2B
14-Alexandrite

Setting permissions to many things using a service.

Hi all,

 

I am using the SetThingPermission service. The aim is to get about 10 things to have authorization to invoke the same services (about 7 services). 

I do not know what the correct values to pass as parameters to SetThingPermission service to achieve what I want,

 

let params1 = {
entityName: "Thing_Name" /* STRING */,
entityType: "Thing" /* STRING */,
permissions: permissionsTable /* INFOTABLE {"dataShape":"RunTimePermissions"} */,
query: undefined /* QUERY */
};
Resources["EntityServices"].SetThingPermission(params1);

 

As per the above, the permissionsTable requires some fields that I once more do not fully understand how to fill. permissionsTable:

 

permissionsTable.AddRow({
isPermitted: true, // BOOLEAN
name: "GetAlertStatuse", // STRING [Primary Key]
resourceName: '', // STRING [Primary Key]
type: "Service", // STRING [Primary Key]
permissionName: "ServiceInvoke" // STRING [Primary Key]
});

This gives me an error. Does anyone know how to fill in these parameters?

 

Many Thanks.

1 REPLY 1

Please check the DataShape "RunTimePermissions". The properties do have a description field helping with what is what.

Top Tags