mmmmm.... found the solution about my issue:

        false
        
        Router::connect('/', array('controller' => 'clients', 'action' =>
'index', 'admin'=>false));

        right

        Router::connect('/', array('controller' => 'clients', 'action' => 
'index'));

the admin false turns on to use the prefix "admin_"



2010/7/17 Davor Ilic <[email protected]>:
> do i have to use two i have to work with two diffrent controllers one
> for my backendsection and one for my frontendsection?
> i this the solution
>
> 2010/7/17 Davor Ilic <[email protected]>:
>> i also tried this
>>
>>                function beforeFilter() {
>>                parent::beforeFilter();
>>                $this->Auth->allow('index');
>>                }
>>
>> but nothing
>>
>> 2010/7/17 Davor Ilic <[email protected]>:
>>> i´ve try it and it doesn´t work. it make know the methods with admin_
>>> prefix access without login i try it like this:
>>>
>>>
>>>
>>>                function beforeFilter() {
>>>                        parent::beforeFilter();
>>>                        if($this->__getAdminMode()) {
>>>                                $this->components = array('Auth');
>>>                        }
>>>
>>>                }
>>>
>>> 2010/7/16 Sam Sherlock <[email protected]>:
>>>> [code]
>>>>
>>>>       function __getAdminMode() {
>>>>
>>>>               $adminRoute = Configure::read('Routing.prefixes.0');
>>>>
>>>>               if (isset($this->params['prefix']) && 
>>>> $this->params['prefix'] ==
>>>> $adminRoute) {
>>>>
>>>>                       return true;
>>>>
>>>>               }
>>>>
>>>>               return false;
>>>>
>>>>       }
>>>>
>>>> [/code]
>>>> the code above is adapted for cake1.3 is is from
>>>> http://github.com/josegonzalez/cakephp-admin-panel/blob/master/app_controller.php
>>>>  - S
>>>>
>>>>
>>>>
>>>> On 16 July 2010 18:49, Davor Ilic <[email protected]> wrote:
>>>>>
>>>>> should i poll it with params['admin'] in app_controller to use component
>>>>> auth or not? or is there another way or did i missunderstood something 
>>>>> with
>>>>> Authcomponent?
>>>>>
>>>>> 2010/7/16 Davor Ilic <[email protected]>
>>>>>>
>>>>>>
>>>>>> 2010/7/16 Davor Ilic <[email protected]>
>>>>>>>
>>>>>>> i forgot used this routes:
>>>>>>> Router::connect('/admin', array('controller' =>
>>>>>>> 'users','action'=>'login','admin'=>true));
>>>>>>> Router::connect('/admin/:controller/:action/*', array('admin' => true));
>>>>>>> Router::connect('/', array('controller' => 'contents', 'action' =>
>>>>>>> 'index', 'admin'=>false))
>>>>>>
>>>>>> i meen i forgot which root i use to tell
>>>>>>
>>>>>>>
>>>>>>> 2010/7/16 Davor Ilic <[email protected]>
>>>>>>>>
>>>>>>>> yes thats right. i tell app_controller to use the component auth but
>>>>>>>> don´t know how to tell app_controller to use for auth the 
>>>>>>>> "admin_method" and
>>>>>>>> for frontend this "method" in my case "admin_index()" and "index()"
>>>>>>>>
>>>>>>>> 2010/7/16 Sam Sherlock <[email protected]>
>>>>>>>>>
>>>>>>>>> I am sorry I misunderstood your question.
>>>>>>>>> It sounds as if you your having an issue with the auth comp but you
>>>>>>>>> have not posted your code
>>>>>>>>> are you being redirected to login for all controllers/actions?
>>>>>>>>>
>>>>>>>>>  - S
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 16 July 2010 17:50, Davor Ilic <[email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>> don´t need this i already have an backend but need an frontend now
>>>>>>>>>> with the same controllers
>>>>>>>>>>
>>>>>>>>>> 2010/7/16 Hugo M <[email protected]>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>>>>>>>>>>
>>>>>>>>>>> 2010/7/16 Davor Ilic <[email protected]>
>>>>>>>>>>>>
>>>>>>>>>>>> hmmm don´t understand it well, because:
>>>>>>>>>>>> if i set this prefixes in core why i will using then the index()
>>>>>>>>>>>> method "and" the clients_index?
>>>>>>>>>>>> Also for auth i set it in the app controller and it ask me every
>>>>>>>>>>>> time to login regardless of whether i´m in the admin section or 
>>>>>>>>>>>> the frontend
>>>>>>>>>>>> where i only want to output the content from db.
>>>>>>>>>>>> Mybe i can change something in this auth controller to to only use
>>>>>>>>>>>> it in the admin section where the methods only called with the 
>>>>>>>>>>>> prefix
>>>>>>>>>>>> "admin_"...
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2010/7/16 Sam Sherlock <[email protected]>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Configure admin and clients as prefixes in core.php
>>>>>>>>>>>>>
>>>>>>>>>>>>> then in clients controller
>>>>>>>>>>>>> admin_index()
>>>>>>>>>>>>> clients_index()
>>>>>>>>>>>>> index()
>>>>>>>>>>>>>  - S
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 16 July 2010 00:11, Davor Ilic <[email protected]> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> My problem is i use now my own backend which i wrote it with
>>>>>>>>>>>>>> cakephp but how i can use now the same controllers for my 
>>>>>>>>>>>>>> frontend not the
>>>>>>>>>>>>>> same as backend methods but the same controller ? example:
>>>>>>>>>>>>>> i have an Controller: ClientsController in which an:
>>>>>>>>>>>>>> admin_index() and index() but can´t use index() without asking 
>>>>>>>>>>>>>> mie to
>>>>>>>>>>>>>> authentifacting me...
>>>>>>>>>>>>>> how to solve this to see the frontend
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and
>>>>>>>>>>>>>> help others with their CakePHP related questions.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 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
>>>>>>>>>>>>>
>>>>>>>>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and
>>>>>>>>>>>>> help others with their CakePHP related questions.
>>>>>>>>>>>>>
>>>>>>>>>>>>> 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
>>>>>>>>>>>>
>>>>>>>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>>>>>>>>> others with their CakePHP related questions.
>>>>>>>>>>>>
>>>>>>>>>>>> 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
>>>>>>>>>>>
>>>>>>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>>>>>>>> others with their CakePHP related questions.
>>>>>>>>>>>
>>>>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>>>>>>> others with their CakePHP related questions.
>>>>>>>>>>
>>>>>>>>>> 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
>>>>>>>>>
>>>>>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>>>>>>>> others with their CakePHP related questions.
>>>>>>>>>
>>>>>>>>> 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
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>>>>> with their CakePHP related questions.
>>>>>
>>>>> 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
>>>>
>>>> Check out the new CakePHP Questions site http://cakeqs.org and help others
>>>> with their CakePHP related questions.
>>>>
>>>> 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
>>>>
>>>
>>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to