Thx for your answer unfortunaly I dont totaly get what you mean, but i
dont think you got me nether :P
So first, I'm a cake newbie and I'm trying to develop a quite big
report system with cake as foundation.
Anyway, my bigest question is not realy related to cake, more to the
MVC-patter, since i wonder wether or not it is wrong to put access
controll in the model, or does it belong to the controllers?
And now i acually got another idea/question, if its possible (without
breaking MVC, and within the scope of cakephp) to implement access
controll at the model level, will it be possible to, for instance, use
generateList on a model to get a list that does not contain the
objects that the current user does not have read access for.
I hope that someone can see where im gooing with this and can supply
anyanswer :P, or if i'm to fluffy about anything ask and i will try to
explain my self.
//Laeffe
On 21 Okt, 20:38, Gwoo <[EMAIL PROTECTED]> wrote:
> this is integrated into the AuthComponent already.
>
> function beforeFilter() {
> $this->Auth->authorize = array('model' => 'User');
>
> }
>
> then put this in the Usermodelfor instance.
>
> function isAuthorized($user, $controller, $action) {
> //do some checks
> return false;
>
> }
>
> if you want to do it for themodelof the current request, then just
> use
>
> $this->Auth->authorize = array('model' => $this->modelClass);
>
> and put the isAuthorized method in your AppModel as you suggest.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---