You can try beforeFind model callback to add this condition to all "find" calls. And set to true/false some model variable from controller (true in admin section, false by default) to check in beforeFind.
On Jul 29, 12:38 pm, park <[email protected]> wrote: > Hi, > > Would like to add an "approved" field for a model. Users can only see > entries whose Model.approved = 1. Only in admin section can unapproved > entries be retrieved. > > It's an existing site, so I don't want to rewrite conditions for all > find queries. > > Is there a centralized method (presumably in Model) of achieving this? > > Many thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
