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 Wed, 04 Aug 2010 06:50:21 GMT
hi

> Thank you!  Is there some documentation to read over about this somewhere?

i don't know of any. there should be some information in the javadoc
of the corresponding interfaces ProtectedPropertyImporter and
ProtectedNodeImporter.

in short it works as follows:

if a protected item is detected during a session import (workspace
import doesn't support it up to now) the protected item importers
defined in the configuration (in that order) are passed the
information collected during the import and may or may not be
willing or able to process them.
the configuration allows you to write custom importers that fit
your needs e.g. if you have custom nodetypes.

if you are just using a standard jackrabbit, the existing importer
implementations should cover your needs.

hope that helps.
angela


> Still doing initial investigations to get this to work and would like some more info
to go on.
> 
>  -- Cory
> 
> On 04/08/2010, at 12:21 AM, Angela Schreiber wrote:
> 
>> 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