Is session variable a good place to store authorization info?

2012-05-12 Thread bs28723
I created a Auth component to do some special authorization checking. The Auth component gets called first before any controller isAuthorized routines. I was thinking about saving some permissions in a session variable inside the Auth component. Then the controller could get this detail and pe

Re: Recover associated data of second level.

2012-05-12 Thread Tony Messias
What about the "recursive" param on your params array? http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find i.e: $this->User->find('all', array('recursive' => 2)); -- Luiz Antonio S Messias Desenvolvedor Web @tonyzrp *Li

Re: Using Oracle

2012-05-12 Thread John Hardy
IMO with a cluttered schema i would rely on stored procedures for the abstraction and keep the code complexity at a minimum On May 11, 2012 11:54 PM, "rihad" wrote: > Most tables in our Oracle database are huge with tens of columns, have > no single-column primary keys, or have multi-column keys.

Re: Is there a way to test if "on localhost" ?

2012-05-12 Thread John Hardy
Use the uname method to test the machines name Http://php.net/php_uname On May 12, 2012 11:27 AM, "Daniel" wrote: > Hi, > > I want to write some code along the lines of: > if ("on localhost") >// site is being tested: do something > else >// site is live: do something else > > ..

Re: Is there a way to test if "on localhost" ?

2012-05-12 Thread Christopher Castro
You can try something like this: if (in_array(env('HTTP_HOST'), array('localhost', '127.0.0.1'))) { // localhost } else { // live } 2012/5/12 Daniel > Hi, > > I want to write some code along the lines of: > if ("on localhost") >// site is being tested: do something > else >

Is there a way to test if "on localhost" ?

2012-05-12 Thread Daniel
Hi, I want to write some code along the lines of: if ("on localhost") // site is being tested: do something else // site is live: do something else ... or is there another way to do this? Thanks. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

Re: Recover associated data of second level.

2012-05-12 Thread J.
To Be more precise I have : User hasOne Profile Profile belongsTo USer Profile HABTM Card Card HABTM Profile Since profile belongs to User, How can I get its associated data (CArd) from the USer view ? Le samedi 12 mai 2012 16:25:48 UTC+2, J. a écrit : > > Hi, > > In my cake app I have : > >

Model Behavior and filtering results in a DboSource class Options

2012-05-12 Thread kirill_z
I've noticed that _queryAssociation method, within DboSource class, calls linked models afterFind callback, but does not calls linked models behavior callbacks. IMHO, it can be potential risk when you protect some model with AclBehavior. Because, Model->find() method returns associated model data d

Recover associated data of second level.

2012-05-12 Thread J.
Hi, In my cake app I have : User hasOne Profile HasAndBelongsToMany Card When I find a user, I get this array : array( > 'User' => array( > 'password' => '*', > 'id' => '1', > 'email' => '***', > 'username' => '**', >

Re: Bake in Cakephp 2.0 give me a code of previus version?!!

2012-05-12 Thread gabrielem
now I found a different problem :) The code generated by bake is now of cakephp 2.0 version But it not work... I have only a blank page, and if i write something in the app controller or every where i have only blank page and blank html... Il giorno sabato 12 maggio 2012 09:29:40 UTC+2, g

Re: Bake in Cakephp 2.0 give me a code of previus version?!!

2012-05-12 Thread gabrielem
I solved! Thank You Justin it was /usr/bin/cake it was looking for a wrong path! Now i change the path on the cake file #LIB=/usr/share/php/cake/console/ LIB=/usr/share/php/cakephp/app/Console/ Il giorno venerdì 11 maggio 2012 11:02:01 UTC+2, Justin Edwards ha scritto: > > Enter the command