Before looking at the code to get a "yes / no" answer I wanted to ask this question and get some feedback on design decisions about XoTCL permissions.
My assumption would be that you register permission checks as filters on the class. Is this the case? If so, does the filter have a default name so it could be overwritten? At which class level does it apply?
I would further assume that (if we do it the filter way) we can have default filters for CURD functions on ACS object derived classes like these:
Update ($object_id save): translates into write on object_id
Delete ($object_id delete): translates into delete on object_id. Could inherit from write (at least I think that is how the current thinking works, that by default you can delete if you can write)
Retrieve ($object_id instantiate): translates into read
Create ($object_id save_new): translates into create. And here I am unsure how to model this due to the fact that on create we do not have permissions on the object.
So my understanding would be that we give permissions on the context_id, so if you have create permissions on the context_id you would be allowed to create the object. But don't we usually want to give create permissions on the Class / object type? I am aware that this goes right back to my question of revisiting the permission system and I will ask about it in more detail there.
The benefit of the default filters (something which is hard to model in pure TCL if I'm not mistaken) would be that we do not have to concern ourselves with writing permission::permission_p all over the place, which is neglected most of the time anyway.
Having the ability to overwrite them by class would also allow you to have a finer level of permissions. Additionally you could probably write a mixin class if you have your own permission system or if you want to check permissions through an external source.
I am thinking here of organizations that use already complex systems for Roles and permissions on roles and functionalities. If you sell them OpenACS, one of the questions is "Do we have to model our permissions in your system as well?" In larger organizations that can become a full time job. Therefore being able to write a "translator" class which can map the general permissions is a good thing.