On 05/09/07, Jason <[EMAIL PROTECTED]> wrote:
>
> Even if I don't create the CRUD functionality, it's still there for
> another developer to totally mess things up. To add some level of
> protection I've created an AppReadOnlyModel that extends AppModel
> which has overridden save and delete functionality. It was easier than
> editing the beforeSave and beforeDelete callbacks of every model I
> wanted to make readonly.

That seems a little bit like overkill.  If you can't trust your
developers, who can probably remove the extra checks you have put in
place if they have access to create CRUD functions in your code, then
don't let them develop at all.  Sorry if I am not understanding you
properly here, or jumping to conclusions.

> Could you elaborate a little bit on the bind,unbind functionality and
> how it could be used here? Or point me in the direction I need to go
> in the vast internets to find said functionality? Unfortunately I'm

I have written a little bit about the unBindModel in my blog, which
might help you out:
http://griffinm.wordpress.com/2007/06/15/using-unbindmodel-in-cakephp/
What it does is remove un-needed associations to speed up the database
queries.  bindModel works in the same way if you want to temporarily
add more associations.

Mike.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to