jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: Importing a system view loses ACLs?
Date Tue, 03 Aug 2010 14:21:03 GMT
hi

by default protected items are not imported.
there is a option in the workspace configuration
that allows you to specify which protected content
should be respected during import:

add something like

<Workspace name="yourworkspace">
	[...]
	<Import>
		<ProtectedNodeImporter 
class="org.apache.jackrabbit.core.xml.AccessControlImporter"/>
  		<ProtectedPropertyImporter 
class="org.apache.jackrabbit.core.security.user.UserImporter">
    		<param name="importBehavior" value="besteffort"/>
   		</ProtectedPropertyImporter>
	</Import>
[...]

note: currently this only works for session import.

regards
angela

see also: https://issues.apache.org/jira/browse/JCR-2195

> If I export the system view of a subtree that contains ACLs, and then import that XML
into an empty repository, none of the ACLs are imported.
> 
> I have verified using system view exports of the entire repository (ie: the root node
"/") that all that is missing of the data I have in the original repository is the ACLs.
> All I have is:
> <sv:node sv:name="rep:policy">
>   <sv:property sv:name="jcr:primaryType" sv:type="Name">
>     <sv:value>rep:ACL</sv:value>
>   </sv:property>
> </sv:node>
> 
> Whereas I should have:
> <sv:node sv:name="rep:policy">
>   <sv:property sv:name="jcr:primaryType" sv:type="Name">
>     <sv:value>rep:ACL</sv:value>
>   </sv:property>
> <sv:node sv:name="allow">
>   <sv:property sv:name="jcr:primaryType" sv:type="Name">
>     <sv:value>rep:GrantACE</sv:value>
>   </sv:property>
>   <sv:property sv:name="rep:principalName" sv:type="String">
>     <sv:value>authors</sv:value>
>   </sv:property>
>   <sv:property sv:name="rep:privileges" sv:type="Name">
>     <sv:value>jcr:all</sv:value>
>   </sv:property>
>   </sv:node>
> </sv:node>
> 
> This is with Jackrabbit 2.1.0.
> 
> Am I doing something wrong?
> 
>  -- Cory
> 
> PS: On a side not, it's interesting that the mix:created mixin retains the createdBy
username however it gets the current created timestamp - essentially losing data and somewhat
inconsistent.
> It sorta makes sense, but then again it'd be nice if you could force it to honour the
import value somehow.
> 
> 


Mime
View raw message