Skip to main content
1-Visitor
October 3, 2016
Question

How to manage different users and projects in the same mashups

  • October 3, 2016
  • 3 replies
  • 5562 views

I would like to know if it is possible to run two distinct projects on the same mashups.

In details:

I have two projects (lets call them projectA and projectB) which do the same things.

ProjectA has:

3 users (User1A, User2A, User3A);

20 things (Things1A, ..., Things20A);

  3 properties (prop1, prop2, prop3);

1 stream;

1 Data Shape;

1 Data table;

ProjectB has:

2 users (User1B, User2B);

15 things (Thing1B, ..., Thing15B);

  3 properties (prop1, prop2, prop3) -- the same of projectA;

1 stream;

1 Data shape;

1 Data table.

This means that mashups for projectA and projectB are identical so, I want to know: instead of duplicate them, is it possible to create the same but allow to userA only to see data of projectA and same for UserB?

Plus, there will be some helper things for the template or master (which will be the same for A and B), is it possible for this things to have different values when is either logged UserAs or UserBs?

I tried creating Users and GroupUsers; then I created OrganizationA and OrganizationB.

In my thingA, under tab Visibility I added OrganizationA; then I created a simple mashup with just a list and a dashboard.

In the list there is the "QueryImplementingThings" service of the thingtemplate (which holds both thingA and B).

I expect to see ThingA in the list when I log with UserA and ThingB when I log with user B, instead I only see this:

3 replies

1-Visitor
October 3, 2016

You should have something wrongly defined under Visibility or Permissions, but you should do as you described through visibility, setting visibility on Things and Users through different organizations, or in the same organizations but on different nodes of the hierarchy.

Mashups should be visible by everyone, also you have to give visibility to the corresponding streams/datatables.

fmanniti1-VisitorAuthor
1-Visitor
October 3, 2016

Ok: this is what:

ThingA:

Visibility: OrganizationA

Design Time: GroupA allowed to read, update and delete

Runtime: GroupA allowed to Property Read, Property Write, Event Execute, Event Subscribe, Service execute


Mashup:

Visibility: OrganizationA

ProjectA:
Visibility: OrganizationA

Design Time: Group A allowed to all

Runtime: Group A allowed to all.

If I go on mashup I can't see anything (like the image I posted above).

If I go on ThingTemplate:

Visibility: OrganizationA

DesignTime: GroupA allowed to all

Runtime: GroupA allowed to all

In mashup I see both thingsA and thingsB

fmanniti1-VisitorAuthor
1-Visitor
October 3, 2016

Oh, maybe wait! I'm thinking it may be correct I see all things and I should hide the "wrong" ones by filtering the query. Is it fine?

1-Visitor
October 3, 2016

Hi Fabio,

From your description it's hard to say, you din't said nothing about Visibility on ThingsB, you may have "Everyone" group/visibility on collection level that may effect this...

Carles.

fmanniti1-VisitorAuthor
1-Visitor
October 3, 2016

UserB is symmetrical to UserA

ThingB:

Visibility: OrganizationB

Design Time: GroupB allowed to read, update and delete

Runtime: GroupB allowed to Property Read, Property Write, Event Execute, Event Subscribe, Service execute


Mashup:

Visibility: OrganizationB (and with OrganizationA)

ProjectB:
Visibility: OrganizationB

Design Time: Group B allowed to all

Runtime: Group B allowed to all.

In other words, I want everything ends with B is seen by UserBs and not by As and viceversa

fmanniti1-VisitorAuthor
1-Visitor
October 3, 2016

Ok. It seems everything works now.

I deleted the two users and created them again.

Just to say, I followed this

http://support.ptc.com/cs/help/thingworx_hc/thingworx_7.0_hc/index.jspx?id=DashboardConfiguration&action=show

(It may be usefull in the future)

if I will have any more problems in the future, I will update this post.

Thank you