[Moin-user] Theme Help
Thomas Waldmann
tw-public at gmx.de
Mon Oct 11 02:41:54 EDT 2004
> A page by page approach whereby if the user has the ACL right to write to
> the page then the authoring stuff will appear
>
> A user approach where if the user is known the authoring stuff will appear
>
> Does anyone have any views on this? Can anyone give me some help in
> implementing this?
Both shouldn't be a problem (but because of the different cases, it will
make writing the theme a bit more extensive).
If you start that development now, maybe do it for moin 1.3devel / beta.
You can also do it for 1.2, but there might be some minor changes
necessary for 1.3 and 1.2.4 will be the last 1.2.x release.
In the theme object (see __init__ of it), you have self.request and via
that, you can query like this:
if self.request.user.valid: ... # user is known (logged in)
if self.request.user.may.write(d['page_name'): ... # user may edit this page
BTW, Nir is working on a really nice "aluminium" theme. Maybe you want
to work together with him finishing and modifying it? Some theme
adapting to ACLs could be of common interest (we don't need to show
actions the user is not allowed to do anyway).
Hope that helps.
Thomas
More information about the Moin-user
mailing list