Re: [Hypercontent-users] download zip facility
Brought to you by:
alexvigdor
|
From: tom t. <j_l...@ya...> - 2007-08-29 00:19:05
|
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="group:anybody" target="/**/*.*"
activity="read"/>
<permission principal="group:anybody"
target="/config/**/*.*" activity="read"
denied="true"/>
<permission principal="group:anybody"
target="/config/**/" activity="read" denied="true"/>
<permission principal="group:anybody"
target="/design/**/" activity="read" denied="true"/>
<permission principal="group:anybody"
target="/xsl/**/" activity="read" denied="true"/>
<permission principal="group:anybody"
target="/dtd/**/" activity="read" denied="true"/>
<permission principal="group:anybody"
target="/workflow-data/**/" activity="read"
denied="true"/>
<permission principal="group:authors" target="/**/"
activity="read"/>
<permission principal="group:authors" target="/**/*.*"
activity="create"/>
<permission principal="group:authors" target="/**/*.*"
activity="write"/>
<permission principal="group:authors" target="/**/*.*"
activity="delete"/>
<permission principal="group:authors" target="/**/"
activity="build"/>
<permission principal="group:authors" target="/**/*.*"
activity="build"/>
<permission principal="group:approvers" target="/**/"
activity="read"/>
<permission principal="group:approvers"
target="/**/*.*" activity="create"/>
<permission principal="group:approvers"
target="/**/*.*" activity="write"/>
<permission principal="group:approvers"
target="/**/*.*" activity="delete"/>
<permission principal="group:approvers"
target="/**/*.*" activity="approve"/>
<permission principal="group:publishers" target="/**/"
activity="read"/>
<permission principal="group:publishers"
target="/**/*.*" activity="read"/>
<permission principal="group:publishers" target="/**/"
activity="publish"/>
<permission principal="group:publishers"
target="/**/*.*" activity="publish"/>
</permissions>
zip.xml
<workflow binding="/**/">
â
<event name="download-zip" permissions="read">
<variable name="zipper" value="${actor}"/>
<variable name="href"
value="${abs-server-base}/screens/please-wait.html"/>
<nq q="zipping"/>
<nq who="${zipper}"/>
<zip/>
</event>
â
<event name="upload-zip" permissions="read,write">
<variable name="uploader" value="${actor}"/>
<input name="zip" label="Choose a zip to upload"
type="file"/>
<input name="force" type="select" label="Force
overwrite" options="true,false" default="false"/>
<copy path="/" source="${zip}" destination="${path}"
force="${force}" delete="false"/>
<variable name="href"
value="${abs-server-base}/screens/please-wait.html"/>
<nq q="uploading"/>
<nq who="${uploader}"/>
</event>
â
<q id="zipping">
â
<event name="batch-complete">
<variable name="zip" value="${zip}"/>
<variable name="href"
value="${abs-server-base}${zip}?mode=download-link"/>
<dq/>
<nq q="zipped"/>
</event>
</q>
â
<q id="uploading">
â
<event name="batch-complete">
<variable name="href"
value="${abs-server-base}${work-path}?mode=work-details"/>
<dq/>
<nq q="uploaded"/>
</event>
</q>
â
<q id="zipped">
â
<event name="discard" who="${zipper}">
<delete path="${zip}"/>
<dq/>
<dq who="${zipper}"/>
</event>
</q>
â
<q id="uploaded">
â
<event name="discard" who="${uploader}">
<delete path="${zip}"/>
<dq/>
<dq who="${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 ="group:publishers"
> > target="/**/"
> > activity="read"/>
> > <permission principal ="group:publishers"
> > target="/**/*.*"
> > activity="read"/>
> >
> >
> > 2) In the bootstrap project I changed as follows
> >
> > <permission principal ="group:anybody"
> > target="/screens/**/*.html"
> > activity="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 ="group:anybody"
> >> target="/screens/**/*.html"
> >> activity="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 ="group:publishers"
> >>>> target="/**/"
> >>>> activity="read"/>
> >>>> <permission principal ="group:publishers"
> >>>> target="/**/*.*"
> >>>> activity="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=monopolyherenow
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >
>
----------------------------------------------------------------------
> >>>>
> >>>>> ---
> >>>>> 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
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
>
______________________________________________________________________
> >>
> >>> ______________
>
=== message truncated ===
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
|