5 Replies Latest reply on Jul 31, 2015 9:05 AM by paic RSS
    ashleyg Apprentice

    Cannot add Property Permissions to Networks

    Hi

     

    I am building a network based on a 'CustomerName' user extension of a user that is accessing a mashup (this is bound in the Data tab correctly).

     

    However on my script I have attempted to add runtime permissions to the network I want to display but when I test this service I get an error saying:

     

    Wrapped java.lang.Exception: This entity does not support property permissions Cause: This entity does not support property permissions

     

    This is my script:

     

    var NetworkName = "Atlas.Customer." + CustomerName + ".Network";

     

    var params = {

      principal: CustomerName /* STRING */,

      allow: true /* BOOLEAN */,

      resource: "*" /* STRING */,

      type: "PropertyRead" /* STRING */,

      principalType: "Group" /* STRING */

    };

     

    // no return

    Networks[NetworkName].AddRunTimePermission(params);

     

    Note: This entity was created beforehand programmatically. I know Things have to be enabled to use runtime permissions but I cannot find a way to do that with Networks.

     

    Any help you could give me would be highly appreciated.

     

    Many Thanks

     

    Ashley

      • Re: Cannot add Property Permissions to Networks
        paic Collaborator

        For Networks all that is needed/provided is to secure the services, if there are nodes that a user can see or can not see, either you use Visibility on the Things or you use a custom service to retrieve the network information.

        Generally we recommend wrapped services for anything that would otherwise rely on the base services, an exceptions would be valuestream interactions.

          • Re: Cannot add Property Permissions to Networks
            ashleyg Apprentice

            Hi Pai

             

            Many thanks for the swift response.

             

            Unfortunately this doesn't really solve the problem we're having.

             

            We have created a network which currently contains one parent node and 3 child nodes. (User has full permissions on all NODES but not the Network Entity itself). At runtime we have a network connected to a tree widget in a mashup. At runtime however this tree will not populate.

            After assigning runtime permissions manually in the composer the tree then populates at runtime.

            We have written a service (see above) to automatically assign the runtime permissions on the network entity which then gave us the error you can see above.

            What we want to achieve is the tree being visible at runtime without the need to manually assign runtime permissions in the composer.

             

            Thanks

             

            Ashley