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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Cannot add Property Permissions to Networks

ashleyg
1-Newbie

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

5 REPLIES 5
paic
1-Newbie
(To:ashleyg)

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.

ashleyg
1-Newbie
(To:paic)

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

paic
1-Newbie
(To:ashleyg)

How are you retrieving the nodes? Are you using a wrapped service? That would be the best practice, vs. invoking services directly.

I would approach this as follows.

1. apply the system user to all runtime services of all networks

2. create a wrapped service that retrieves the appropriate nodes

3. set visibility security on any nodes that need to be hidden, beyond what you want to do programmatically

If that is not working, check your application log, but I don't believe you need any property read permissions to make this work.

ashleyg
1-Newbie
(To:paic)

Is there any possibility we could set up some kind of remote connection/WebEx/Skype for Business meeting so I could show my screen and talk through the problem I have or is this not feasible?

paic
1-Newbie
(To:ashleyg)

Hi Ashley I would recommend contacting Technical Support for that.

Top Tags