[daisy] ACL Privileges, how to set default user ??
Marc Portier
mpo at outerthought.org
Mon Dec 11 08:46:29 CST 2006
Paweł Burno wrote:
> Hi
>
>
> I've got a problem with configure ACL privileges.
>
It took me some time to understand your usage scenario,
IMHO ACL's are not the way to tackle this, the ContextDoc() function is.
ACL's are executed on the repository, they have no knowledge of 'site'
(or it's default collection)
This ACL does filter result-sets in queries based on read-access rights
(a feature you attempt to exploit). This check is however without the
context (again) of the 'site' currently visited, it is only based on
actual and persistent document-metadata of the items in the result-set.
What you really want is execute a query that will only yield the
documents within the same language-variant as the language-variant of
the doc holding the query.
For this you use the ContextDoc function, and of course provide the
matching language-variant of the document containing the query.
ContextDoc() is available since Daisy 1.5, see http://cocoondev.org/daisy/9
Before 1.5 one could just hardcode the language of your variant in the
query itself.
<snip />
> In documents I'm including documents by query-include and I can't use
> condition language=myLanguage in query.
>
unless I'm missing the point: you *can* do this, and it should give you
a far more elegant (and working) solution then fiddling with the ACL's
the exact syntax would be:
language = ContextDoc(language)
<snip />
> Paul
>
HTH,
regards,
-marc=
--
Marc Portier http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/mpo/
mpo at outerthought.org mpo at apache.org
More information about the daisy
mailing list