Jürgen Ragaller schrieb: > > Am 09.08.2007 um 23:27 schrieb Joern Nettingsmeier: > >> Jürgen Ragaller wrote: >>> Hi >>> I am trying to achieve the following behaviour in a sitemap pipeline: >>> When a user belongs to a group foo, a resource is returned (using a >>> cocoon-reader), else the user gets a login screen (and after the >>> login redirect gets the resource). We intend to use this behaviour >>> for lenya-access-protected assets. >> >> by "resource", you probably mean a static file under <pub>/resources? > > No - a new folder (maybe somewhere inside the content folder) with > assets in it.
Actually I'd discourage this - with Lenya 2.0, you rather work with repository items than with files. It is highly recommended to use the repository API for document storage. >> these files bypass the access controller afaik (but i would need to >> check). >> >> why do you want to do this? if access-controlled assets is what you're >> after, why don't you just use a lenya document (of resource type >> media, or maybe some custom type) and the live access control features >> that are already there? >> >> maybe i'm misunderstanding what you're after... if so, please explain >> some more. >> > > We have a large number (~ 500) of assets that we do not want to upload > one by one so we put them in a folder wich allows simple mass operations. Maybe you could implement an import functionality? You could probably start with the Importer service and customize it to your needs. > The above described idea is to still provide access-control to these > assets with a lenya group (named intranet or so). Any link to > /secure-assets-folder/** will be handeld by a seperate pipeline - and in > this pipeline the access control can be done by lenya. Our idea to > provide a list of these assets is to write a lenya resource type with a > cocoon directory generator (pointing to that asset folder). > > To check in the pipeline (handling the direct links to these assests) if > the logged-in user belongs to group «intranet» I can think of > > - Writing a custom cocoon sitemap-action > - Writing a custom cocoon sitemap-selector > - Writing a input module for our special case of access control If you really want to implement it that way, a selector is probably the cleanest approach. -- Andreas -- Andreas Hartmann, CTO BeCompany GmbH http://www.becompany.ch --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
