Is there a reason you don't just do access control in the controller then?
ie.
if ($this->request->data['User']['creator_id'] ==
$this->Session->read('Auth.User.id')) {
$this->BlogPost->save($this->request->data);
}
BTW, Zuha has a behavior called the UsableBehavior which could probably
That is some funky looking code there, but you could just use the "OR" key.
Here's an example...
$this->find('first', array(
'conditions' => array(
'OR' => array(
'User.username' => $value,
'User.email' => $value
)
)
));
On Saturday
Hi Rob. Thanks for your answer, the behavior is very interesting.
I think I did not express myself well, I dont want just to set that a user
has only access to the posts he created.
I want also to configure for example:
We have hotels around a country from the same organization, so in each cit
Hey
The translate behaviour seems to be quite bad documented.
If you want to work with it correctly, you've to mind to set the locale
attribute:
$this->Yourmodel->locale = false; //storing multiple languages at once
$this->Yourmodel->locale = null; //will use the locale in your conf
$this->Your
Hi Paulo: You are describing row-level access control, and I am doing that
with CakePHP 2.0 using a modified version of Daniel Vecchiato's WhoDidIt
Model Behavior
(https://github.com/danfreak/4cakephp/tree/master/models/behaviors). Then I
check in the controller to see if the id in the table fo
Thankyou @thatsgreat2345, it works well !!
On Monday, August 20, 2012 1:15:45 AM UTC+5:30, thatsgreat2345 wrote:
>
> I'm not sure why you are having issues, I would show you an example but I
> already showed you my example.
> Literally just create a new Pusher object with your secret keys and suc