Peter Speltz wrote:
> --- Dave Howorth <Dave.Howorth at acm.org> wrote:
>>ok_tables is a little different, to my mind. In standard Maypole, it's
>>just a cache for display_tables, which in turn is an extremely simple
>>and limited access control system (there are tables everyone can access
>>and there are hidden tables that no-one can access).
>
> Ah dave, can't you be persuaded?
Oh dear, I think you're a little too far away to buy me a beer ...
> ok_tables is the one in power, the one that's
> checked for access. The key difference is "display". Maypole provides ability
> for one to distinguish between talbes they want advertised to user for access
> and tables that user can access but are not necessarily need to be advertised.
> That's why tabs are made of display tables rather than ok_tables. Internal
> maypole simply adds display tables to ok_tables. ok_tables is really the one in
> power and not display tables. It's just there to help simplify the view of the
> system. A significant difference if you ask me and you give way too much
> credit to display_tables which could be deleted without adverse effects on
> anything but the view. :)
AFAIK, Maypole uses display_tables as the default for ok_tables. If you
supply your own list for ok_tables, there's no connection between the
two as far as the program is concerned.
ok_tables is only used in is_applicable() and that is basically doing
authorization/existence checks on both the class and action, but not in
a user-sensitive way. Indeed, it is run before the user is authenticated
so it's impossible for it to be used in a user-based access control
scheme. So IMHO, as soon as you install a user-based scheme,
is_applicable and ok_tables become irrelevant. I guess I'll probably
override it to sub is_applicable { return OK } and have to provide some
other user-based means of detecting and handling 'plain' templates.
display_tables will be dynamically computed for each user based on
permissions, I expect, though I may well base the navigation on your menu.
Cheers, Dave
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT