Re: [Hypercontent-users] download zip facility
Brought to you by:
alexvigdor
|
From: Alex V. <al...@bi...> - 2007-08-29 13:44:14
|
Hi,
It could have something to do with your permissions setup. HC =
has =20
to resolve conflicting permissions in two ways: those which have a =20
more specific target, and those which have a more specific group. It =20=
evaluates them in that order, so that a more specific target is =20
honored over a more specific group. In your case, that means =20
publishers are inheriting "denied" read permissions for design, xsl, =20
config and dtd from group:anybody; however if you assign =20
group:publishers read for any of those targets, the more specific =20
group of publishers will take precedence.
=09
Alex
On Aug 28, 2007, at 8:18 PM, tom tom wrote:
> Hi Alex,
>
> Yes it is not a empty directory at all, basically this
> is the very root folder, my intention was to download
> the entire site as a publisher.
>
> this works fine if I login as a administrator.
>
> But we want to give the download zip feature for
> publishers as well. That is this effort.
>
>
> After the above effort I did login and browse to a
> lower directory and tried to download it but still it
> doenst show the link but shows the error which I sent
> previous email.
>
> Any how I am sending my permissions.xml and zip.xml
> for your reference
>
> permissions.xml
> <permissions>
> <permission principal=3D"group:anybody" target=3D"/**/*.*"
> activity=3D"read"/>
> <permission principal=3D"group:anybody"
> target=3D"/config/**/*.*" activity=3D"read"
> denied=3D"true"/>
> <permission principal=3D"group:anybody"
> target=3D"/config/**/" activity=3D"read" denied=3D"true"/>
> <permission principal=3D"group:anybody"
> target=3D"/design/**/" activity=3D"read" denied=3D"true"/>
> <permission principal=3D"group:anybody"
> target=3D"/xsl/**/" activity=3D"read" denied=3D"true"/>
> <permission principal=3D"group:anybody"
> target=3D"/dtd/**/" activity=3D"read" denied=3D"true"/>
> <permission principal=3D"group:anybody"
> target=3D"/workflow-data/**/" activity=3D"read"
> denied=3D"true"/>
> <permission principal=3D"group:authors" target=3D"/**/"
> activity=3D"read"/>
> <permission principal=3D"group:authors" target=3D"/**/*.*"
> activity=3D"create"/>
> <permission principal=3D"group:authors" target=3D"/**/*.*"
> activity=3D"write"/>
> <permission principal=3D"group:authors" target=3D"/**/*.*"
> activity=3D"delete"/>
> <permission principal=3D"group:authors" target=3D"/**/"
> activity=3D"build"/>
> <permission principal=3D"group:authors" target=3D"/**/*.*"
> activity=3D"build"/>
> <permission principal=3D"group:approvers" target=3D"/**/"
> activity=3D"read"/>
> <permission principal=3D"group:approvers"
> target=3D"/**/*.*" activity=3D"create"/>
> <permission principal=3D"group:approvers"
> target=3D"/**/*.*" activity=3D"write"/>
> <permission principal=3D"group:approvers"
> target=3D"/**/*.*" activity=3D"delete"/>
> <permission principal=3D"group:approvers"
> target=3D"/**/*.*" activity=3D"approve"/>
> <permission principal=3D"group:publishers" target=3D"/**/"
> activity=3D"read"/>
> <permission principal=3D"group:publishers"
> target=3D"/**/*.*" activity=3D"read"/>
> <permission principal=3D"group:publishers" target=3D"/**/"
> activity=3D"publish"/>
> <permission principal=3D"group:publishers"
> target=3D"/**/*.*" activity=3D"publish"/>
> </permissions>
>
>
> zip.xml
>
> <workflow binding=3D"/**/">
> =E2=88=92
> <event name=3D"download-zip" permissions=3D"read">
> <variable name=3D"zipper" value=3D"${actor}"/>
> <variable name=3D"href"
> value=3D"${abs-server-base}/screens/please-wait.html"/>
> <nq q=3D"zipping"/>
> <nq who=3D"${zipper}"/>
> <zip/>
> </event>
> =E2=88=92
> <event name=3D"upload-zip" permissions=3D"read,write">
> <variable name=3D"uploader" value=3D"${actor}"/>
> <input name=3D"zip" label=3D"Choose a zip to upload"
> type=3D"file"/>
> <input name=3D"force" type=3D"select" label=3D"Force
> overwrite" options=3D"true,false" default=3D"false"/>
> <copy path=3D"/" source=3D"${zip}" destination=3D"${path}"
> force=3D"${force}" delete=3D"false"/>
> <variable name=3D"href"
> value=3D"${abs-server-base}/screens/please-wait.html"/>
> <nq q=3D"uploading"/>
> <nq who=3D"${uploader}"/>
> </event>
> =E2=88=92
> <q id=3D"zipping">
> =E2=88=92
> <event name=3D"batch-complete">
> <variable name=3D"zip" value=3D"${zip}"/>
> <variable name=3D"href"
> value=3D"${abs-server-base}${zip}?mode=3Ddownload-link"/>
> <dq/>
> <nq q=3D"zipped"/>
> </event>
> </q>
> =E2=88=92
> <q id=3D"uploading">
> =E2=88=92
> <event name=3D"batch-complete">
> <variable name=3D"href"
> value=3D"${abs-server-base}${work-path}?mode=3Dwork-details"/>
> <dq/>
> <nq q=3D"uploaded"/>
> </event>
> </q>
> =E2=88=92
> <q id=3D"zipped">
> =E2=88=92
> <event name=3D"discard" who=3D"${zipper}">
> <delete path=3D"${zip}"/>
> <dq/>
> <dq who=3D"${zipper}"/>
> </event>
> </q>
> =E2=88=92
> <q id=3D"uploaded">
> =E2=88=92
> <event name=3D"discard" who=3D"${uploader}">
> <delete path=3D"${zip}"/>
> <dq/>
> <dq who=3D"${uploader}"/>
> </event>
> </q>
> </workflow
>
>
>
>
> --- Alex Vigdor <al...@bi...> wrote:
>
>> Hi Lalitha,
>> That error indicates that no files were in the zip.
>> Are you sure
>> you were trying to download a non-empty directory?
>>
>> Cheers,
>> Alex
>>
>> On Aug 27, 2007, at 8:41 PM, tom tom wrote:
>>
>>> Hi Alex,
>>>
>>> I did the following
>>>
>>> 1)In my project permissions.xml I did add the
>>> following entry
>>> <permission principal =3D"group:publishers"
>>> target=3D"/**/"
>>> activity=3D"read"/>
>>> <permission principal =3D"group:publishers"
>>> target=3D"/**/*.*"
>>> activity=3D"read"/>
>>>
>>>
>>> 2) In the bootstrap project I changed as follows
>>>
>>> <permission principal =3D"group:anybody"
>>> target=3D"/screens/**/*.html"
>>> activity=3D"read"/>
>>>
>>> But when I go to the workflow screen and press the
>>> download zip, this time it did not give a
>>> authorization exception but just stays in the
>>> please-wait.html. It does not show the download
>> link,
>>>
>>> When I click show details, it gives the following.
>>>
>>> Should I have to do anything else.
>>>
>>>
>>>
>>> Processing
>>> Error
>>> ZIP file must have at least one entry
>>>
>>
> [java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:291),
>>>
>>
> org.hypercontent.workflow.exec.impl.ZippingExecutable.execute
>>
>>> (ZippingExecutable.java:139),
>>>
>>
> org.hypercontent.workflow.exec.impl.AbstractExecutable.runWithExceptio
>>
>>> n(AbstractExecutable.java:127),
>>>
>>
> org.hypercontent.workflow.exec.impl.AbstractExecutable.run
>>
>>> (AbstractExecutable.java:147),
>>>
>>
> org.hypercontent.workflow.queue.impl.ExecutableQueueRunner.run
>>
>>> (ExecutableQueueRunner.java:106),
>>>
>>
> org.hypercontent.workflow.thread.CPQThread.run(CPQThread.java:62)]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --- Alex Vigdor <al...@bi...> wrote:
>>>
>>>> Try adding a permission like this in the
>> bootstrap
>>>> project:
>>>>
>>>> <permission principal =3D"group:anybody"
>>>> target=3D"/screens/**/*.html"
>>>> activity=3D"read"/>
>>>>
>>>>
>>>> On Aug 26, 2007, at 10:43 PM, tom tom wrote:
>>>>
>>>>> Hi Alex,
>>>>>
>>>>> I was on leave for couple of days, hence the
>>>> delay.
>>>>>
>>>>> Yes that is what I have tried but failed with
>> the
>>>>> following authorization exception
>>>>>
>>>>> You are not authorized to access
>>>>>
>>>>
>>>
>>
> http://localhost/hypercontent/screens/please-wait.html
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Lalitha
>>>>>
>>>>> --- Alex Vigdor <al...@bi...> wrote:
>>>>>
>>>>>> Hi Tom Tom,
>>>>>> All anyone needs to execute download-zip is
>>>> "read"
>>>>>> permission on the
>>>>>> directory and files within it, e.g.
>>>>>>
>>>>>> <permission principal =3D"group:publishers"
>>>>>> target=3D"/**/"
>>>>>> activity=3D"read"/>
>>>>>> <permission principal =3D"group:publishers"
>>>>>> target=3D"/**/*.*"
>>>>>> activity=3D"read"/>
>>>>>>
>>>>>> Cheers,
>>>>>> Alex
>>>>>>
>>>>>> On Aug 19, 2007, at 8:44 PM, tom tom wrote:
>>>>>>
>>>>>>> Hi Alex,
>>>>>>>
>>>>>>> If some other group apart from admin, to have
>>>> the
>>>>>>> download zip facility, how can we change the
>>>>>>> permission.xml.
>>>>>>>
>>>>>>> For. e.g publishers want to have the download
>>>> zip
>>>>>>> facility in addition to the administrators.
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> ______________________________________________________________________
>>>>>>
>>>>>>> ______________
>>>>>>> Boardwalk for $500? In 2007? Ha! Play Monopoly
>>>>>> Here and Now (it's
>>>>>>> updated for today's economy) at Yahoo! Games.
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> http://get.games.yahoo.com/proddesc?gamekey=3Dmonopolyherenow
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> ----------------------------------------------------------------------
>>>>>>
>>>>>>> ---
>>>>>>> This SF.net email is sponsored by: Splunk Inc.
>>>>>>> Still grepping through log files to find
>>>> problems?
>>>>>> Stop.
>>>>>>> Now Search log events and configuration files
>>>>>> using AJAX and a
>>>>>>> browser.
>>>>>>> Download your FREE copy of Splunk now >>
>>>>>> http://get.splunk.com/
>>>>>>>
>> _______________________________________________
>>>>>>> Hypercontent-users mailing list
>>>>>>> Hyp...@li...
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
> https://lists.sourceforge.net/lists/listinfo/hypercontent-users
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
> ______________________________________________________________________
>>>>
>>>>> ______________
>>
> =3D=3D=3D message truncated =3D=3D=3D
>
>
>
> =20
> ______________________________________________________________________=20=
> ______________
> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s =20
> user panel and lay it on us. http://surveylink.yahoo.com/gmrs/=20
> yahoo_panel_invite.asp?a=3D7
>
|