Skip to main content
1-Visitor
June 12, 2018
Solved

Resource collection function

  • June 12, 2018
  • 1 reply
  • 1339 views

I am getting the following issue while running this service, 

var params = {
collectionName: "Mashups" /* STRING */,
principal: "CM_group" /* STRING */,
principalType: "Group" /* STRING */
};

// no return
Resources["CollectionFunctions"].AddCollectionVisibilityPermission(params);

 

Message :: Invalid Entity Type : Group/CM_group

 

while this is working good considering same principalType: "Group" 

 

var params = {
principal: "CM_group" /* STRING */,
allow: true /* BOOLEAN */,
resource: "*" /* STRING */,
type: "ServiceInvoke" /* STRING */,
principalType: "Group" /* STRING */,
collectionName: "Mashups" /* STRING */
};
// no return
Resources["CollectionFunctions"].AddCollectionRunTimePermission(params);

 

 

Best answer by PaiChung

AddCollectionVisibilityPermission is for adding Organizational Units (or a whole organization) to have visibility permission to a collection. So you need to call out the following:

Principal: Name of the Organization or Organizational Unit

PrincipalType: Organization / .... I think .... OrganizationalUnit or maybe just Unit

 

There is a big difference between Design time/ Runtime permissions vs. Visibility permissions

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
June 13, 2018

AddCollectionVisibilityPermission is for adding Organizational Units (or a whole organization) to have visibility permission to a collection. So you need to call out the following:

Principal: Name of the Organization or Organizational Unit

PrincipalType: Organization / .... I think .... OrganizationalUnit or maybe just Unit

 

There is a big difference between Design time/ Runtime permissions vs. Visibility permissions

1-Visitor
June 14, 2018

Thanks for your quick response, it is working, putting "OrganizationalUnit" as type.

 

Regards,

Abhishek kumar