The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hello, I'm trying to create a dashboard through JS but I'm having some issues in adding permissions.
That's the code:
try{
var idDash = Resources["DashboardFunctions"].CreateDashboard({title: "test"});
Dashboards[idDash].AddRunTimePermission({principal: configurator, allow: true, resource: '*', type: 'PropertyRead', principalType: 'User'});
Dashboards[idDash].AddRunTimePermission({principal: configurator, allow: true, resource: '*', type: 'PropertyWrite', principalType: 'User'});
Dashboards[idDash].AddRunTimePermission({principal: configurator, allow: true, resource: '*', type: 'ServiceInvoke', principalType: 'User'});
Dashboards[idDash].AddDesignTimePermission({principal: configurator, allow: true, type: 'Create', principalType: 'User'});
Dashboards[idDash].AddDesignTimePermission({principal: configurator, allow: true, type: 'Read', principalType: 'User'});
Dashboards[idDash].AddDesignTimePermission({principal: configurator, allow: true, type: 'Delete', principalType: 'User'});
result = idDash;
}catch(err){
result = err.message;
}
This is the error I get:
java.lang.Exception: This entity does not support property permissions
Can you tell me what's wrong?
My TW version is ThingWorx 8.0.0-b11
Hi Fabio Manniti ,
There are no Properties to be used in Runtime permissions. This means we cannot grant run time permission related to Properties. It seems that we can only use the AddRunTimePermission that can grant Service execution permission only. So the error would be backed up since there are no properties permissions. This would work by design.
thanks,
Ciprian