[daisy] Hiding language variants according to ACL
A Rocha Webmaster
webmaster at arocha.org
Thu Jul 17 17:17:39 CEST 2008
Hello,
As a preparation for going live with Daisy we want to hide three
languages which aren't ready for going live, and show only 8 other
languages.
I've done the following in the ACL: if language = 'ar' or language =
'zh-Hant' or language = 'zh-Hans', then deny read access.
It's working partially the way I wanted it to: if you go to a document
in either of these three languages, you're denied access. Yet, the list
of variants passed to the XSLT isn't filtered by user read permissions,
so it's showing the existence of document variants which it won't
display.
You may see this by going to the home page: http://daisy.arocha.org then
click on the logo to the right, next to the blurb "A Rocha is..." --
you're taken to the image's page. The logo has a variant in Arabic, you
can see that by the list of variants displayed on top right. Now if you
click on the Arabic link you're denied access.
If you search the page source for ns:availableVariant (yes, I have an
XML source dump inside my final HTML for testing purposes) you'll see
the XML doesn't give any indication that the Arabic variant isn't
available to the guest visitor.
Retiring the languages is not an option, as I have people working on
these languages so they need to be able to translate existing pages and
add new ones in those languages.
My idea for the future is to have <string id="guest-readable">yes|
no</string> for each language in my localisation file, and then in
locale.xsl only print the link to the language variant if user not guest
or guest-readable=yes for that language.
Any ideas for now (i.e. which could be implemented without recourse to
changing the XSLT? This is no biggie for now, relevant content in the
'hidden' languages isn't linked to the other languages in any visible
way (exception for the logo.)
TIA
Júlio.
More information about the daisy
mailing list