How to include a user with permissions in a content package? | Community
Skip to main content
diptinarang
Level 3
Nov 8, 2016 7:28 AM UTC

How to include a user with permissions in a content package?

The use case is to include a custom user as part of a content package. The user abc ('/home/users/system/abc/‘) which is under a group ‘everyone’  has all permissions only on ‘/content/projects’ node. I don’t want to include '/content/projects/rep:policy’ as part of the package as there might be some other permissions already present on the ‘projects’ node. Is there any other way to include this user in the content package?

Thanks

Dipti

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

9 replies

kautuk_sahni
Employee
Jul 4, 2017 10:56 AM UTC

diptinarang nupurjain Check the comments from MC Stuff.

// While installing use merge option.

~kautuk

Translate
Kautuk Sahni
MC_Stuff
Level 10
Jul 4, 2017 7:15 AM UTC

Hi Dipti,

While installing the package use merge option .

Thanks,

Translate
MaxBarrass
Level 3
Jul 3, 2017 12:56 PM UTC

Try adding a user to you package and ensure you have .content.xml and _rep_policy.xml with

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
   jcr:primaryType="rep:ACL">
  <allow
   jcr:primaryType="rep:GrantACE"
   rep:principalName="everyone"
   rep:privileges="{Name}[jcr:all]"/>
</jcr:root>

Translate
kautuk_sahni
Employee
Jul 3, 2017 9:05 AM UTC

MC Stuff​ any help here?

~kautuk

Translate
Kautuk Sahni
Jitendra_S_Toma
Level 10
Nov 8, 2016 8:53 AM UTC

HI,

@Kutuk pointed out. ACL tool to grab all the permissions of al the users. That is the recommended approach.

Regards,

Jitendra

Translate
kautuk_sahni
Employee
Nov 8, 2016 8:35 AM UTC

Check ACL packager.

Link:- https://adobe-consulting-services.github.io/acs-aem-commons/features/acl-packager.html

// 

Purpose
Frequently, access control entries need to be copied from one environment to another without copying the actual content itself, just the access control entries. This user interface allows you to define and build packages containing access control entries for particular paths and/or particular principals.

Reference articles:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__ufln-i_packed_theusergr.html

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__0mo3-we_have_a_groupname.html

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__ajav-ive_searchedhighan.html

I hope this would help you.

~kautuk

Translate
Kautuk Sahni
Nupur_Jain
Employee
Nov 21, 2016 7:52 AM UTC

I tried it out , it does grab all the user permissions but I have a specific use case : If the user has permissions in /content i.e there is node "allow2" of jcr:primaryType "rep:GrantAce" , so using ACS ACL packager will build the /content/rep:policy node in the content package.

What if the new instance in which I want to install my package already has a "allow2" node under /content/rep:policy (containing permissions for some other user ), in this use case I would get an error "Error: org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: Item is protected."
 while installing the package.

Is there any other way to grab permissions so that it does not collide with other permission when I install my package

Translate
kautuk_sahni
Employee
Jun 12, 2017 6:09 AM UTC

nupurjain​ did you get the solution for this one?

~kautuk

Translate
Kautuk Sahni