Re: Deletion Simulation

2013-04-24 Thread godjen99
I would recommend using Unit Tests. It will take some time to set up the data (fixtures) and write the tests and such, but it will benefit your whole project too. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this messag

Re: A more advanced use of ACL?

2013-04-21 Thread godjen99
> > Although I stopped short of this in my recent projects, so I haven't tried >> it, but it seems you could create a component of your own and just inherit >> the AuthComponent and overwrite that way. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitt

Re: A more advanced use of ACL?

2013-04-16 Thread godjen99
> > Although I know of no plugin for this, should be possible. I've been > tinkering with the ACL and Auth a bit now and it's pretty powerful and I > like it a lot - took me a while to get used to it though... Anyway, you > could write your own "check" function, which is where the ARO and ACO a

Re: Check if permission is inherited

2013-03-24 Thread godjen99
I actually built two classed. One listed my permissions that I could find per user and group. The other gets all the Acos keyed by the ID since everything will be looked up by the that in the array. I'll try to come up with some code later on that isn't an exact replica of my code, thus not bre

Re: Check if permission is inherited

2013-03-23 Thread godjen99
Recently I have been "rolling my own" to get this. I came up with a process, the work is proprietary My suggestion would be to look into the using the Aro's (user/group) getPath and using the IDs to look up the specific permissions (aros_acos table) . From there you can look up your Aco dat

Re: Why isn't $this->Auth->user() passing all of the variables?

2013-03-17 Thread godjen99
Normally it's setup in the AppControler, but it can be defined per controller as well. You should have something set up like this - about half way down the page. Auth Docs -- Like Us on FaceBook https://www.face

Re: Why isn't $this->Auth->user() passing all of the variables?

2013-03-17 Thread godjen99
Could you post your Auth component setup code? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving

Re: Best Practise: Use Utilmethods in Controllers, Views, Components...

2013-03-17 Thread godjen99
I've been doing the same as cricket, an additional perk is it's easier to maintain, cleaner and easier to unit test. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Grou

Re: ControllerTestCase adding records to default database on testAction

2013-03-13 Thread godjen99
Is it just one test case, or all. I've had this happen in one case, using the ACL tables... Have you checked the database config file (App/Config/database)? There should be an entry in there like this: public $test = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => '127.

Re: password protect entire site

2013-03-13 Thread godjen99
Are you set on using the .htaccess file? If not, use the Auth component, it's pretty easy to use on it's own. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "Ca

Re: unbind field

2013-03-05 Thread godjen99
Yup, Bind/Unbind models. More specifically, from the book: public function some_action() { // This fetches Leaders, and their associated Followers $this->Leade

Re: How to call a function from a different controller

2013-03-05 Thread godjen99
I would suggest making a custom component, it's more in line with your needs. Also, it doesn't open up the sendMessage to the entire app. Here's how to do it: Creating a custom component -- Like Us on FaceBook htt

Re: beforeValidate can't modify my data

2013-03-02 Thread godjen99
I'm not sure why you would unset the data you have in your validation array, eliminating your validation "catches", but... Two things. First, I would try adding the parent::beforeValidate, like below. Second, I would do some pr and exiting inside that if statement, make sure it's hitting, mayb

Re: Concepts I'm still not sure of...

2012-06-24 Thread godjen99
On Sunday, June 24, 2012 10:27:28 PM UTC-4, rchavik wrote: > > > > Perhaps the new Event system in 2.x would help here > rchavik, thanks for your comment! This is something we were kicking around, but we really couldn't makes sense of what we (the team I work with) were reading, nor we reall

Concepts I'm still not sure of...

2012-06-24 Thread godjen99
So I have been working with CakePHP a while now, and feel pretty comfortable with it. I get the common ideas of MVC, but recently ran into a situation at work that I can't put my finger on how to tackle. The company I work for wants to build a very large application that consists of many proc