[cells-devel] Hooks on Cells accesses?
Kenny Tilton
ktilton at nyc.rr.com
Wed May 25 17:06:57 UTC 2005
Frank Goenninger DG1SBG wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear Cells Users:
>
> Maybe you have come across this also ...
>
> While working on the other challenges I have been telling on this
> list I am also trying to set-up an authorization model for Cells.
>
> I need to check permissions to Create, Update, Read, and Delete a
> cell slot. I thought about having hooks on each of these operations
> such that on every such operation within Cells an "outside function"
> can be called. These just return t or nil depending on permission
> check success or failure. As the model outside can be quite different
> from case to case (app to app) I did not think about implementing
> this within Cells.
>
> So
>
> (cells:add-hook 'cells:slot-read slot-reference 'my-permission-check-
> function)
>
> would install that hook.
I went ahead and made md-slot-value and its setter into generic
functions. Not the end of the world performance-wise from brief analysis
with ACLs profiler. More study necessary, but my guess is you really
want more than this (such as making the hook specific to a slot, as per
your add-hook semantics) and it would impact everyone, so I will await
further input before exploring this further. Possibly you want a new
defmodel slot option?
kt
More information about the cells-devel
mailing list