Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How do you construct a ContentAccessPermission list?

Avatar

Level 5

Greetings All:

I an having trouble building a list to apply security to Spaces in Content Space.

I can populate a single permission, and add that to a list of type ContentAccessPermissions:

SINGLE: (singlePermission1)

<com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>
  <authority>user1/DOM</authority>
  <authorityType>USER</authorityType>
  <permission>Contributor</permission>
  <isAllowed>true</isAllowed>
</com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>

SINGLE ADDED TO EMPTY LIST:

<list>
  <com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>
    <authority>user1/DOM</authority>
    <authorityType>USER</authorityType>
    <permission>Contributor</permission>
    <isAllowed>true</isAllowed>
  </com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>
</list>

All looks well so far

When I try to add additional entries to the list in set value with:

Location: /process_data/newList[get-collection-size(/process_data/newList) + 1] 

Expression: /process_data/singlePermission2

SINGLE: (singlePermission2)
<com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>
  <authority>user2/DOM</authority>
  <authorityType>USER</authorityType>
  <permission>Editor</permission>
  <isAllowed>true</isAllowed>
</com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>

THIS IS THE RESULT:

<list>
  <com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>
    <authority>user2/DOM</authority>
    <authorityType>USER</authorityType>
    <permission>Editor</permission>
    <isAllowed>true</isAllowed>
  </com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission>
  <com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission reference="../com.adobe.livecycle.contentservices.client.impl.ContentAccessPermission"/>
</list>

I get the value of singlePermission2, and singlePermission1 has been lost.

How can I create a list of all my permissions that I can use throughout my process so that I do not have to apply the security separately for each user to each space?

Thanks for you assistance

Mark

0 Replies

Avatar

Level 10

Change Location to just refer the list.

i.e

Location: /process_data/newList

Expression: /process_data/singlePermission2

The above SetValue expression should give you the expected result.

The default behaviour of a SetValue to a List variable is Append (Not overwrite).

So for e.g, If you assign something like this:

listVar = obj1

listVar = obj2

listVar = obj3

listVar = obj4

The output of list variable will contain 4 items within it.

However, I dont find any issue in your expression too. Let me run your logic in my sandbox and see what happens!

Nith

Avatar

Level 5

Hi Nith:

Thanks for your reply.

Sadly, I get the same result when trying to apply your solution.

I should mention that I am running ES2 SP1.

Mark

Avatar

Level 10

Can you send me the portion of your workflow as LCA ?

nith.mof@gmail.com

Nith