1 Reply Latest reply on Jan 12, 2018 10:26 AM by fmanniti RSS
    fmanniti Creator

    Cannot add Runtime and Design permission to dashboard

    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