Re: admin route is not working

2011-04-12 Thread Carlos Eduardo Sotelo Pinto
Hi jan

For any reason, it continues working  :S BUt you ping me on a line that I
get confused now, then my question now is... is on necesary then using the
 line that you refere?

thanks

On Mon, Apr 11, 2011 at 6:38 AM, Oldskool  wrote:

> Hello Carlos,
>
> > // Set default controller routes
> > Router::connect('/admin', array('controller' => 'dashboard', 'action' =>
> > 'index', 'admin' => true));
>
> I think this route is impacting the admin routing of cake itself. You
> are setting /admin as a route and are setting admin = true on the same
> line, which confuses me. You seem to be using Cake's admin routing but
> are defining your own admin route aswell? I think you need to either
> choose one or the other.
>
> Could you try something else here like /management or similar to see
> if the problem still persists?
>
> Kind regards,
> Jan Dorsman
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at 
> http://groups.google.com/group/cake-php<https://groups.google.com/group/cake-php>
>



-- 
Carlos Eduardo Sotelo Pinto
PHP Senior Web Developer
Cell (preferred): (Mov)+51, 959980794 :: (Claro)+51, 952707662
http://www.csotelo.org
Skype: csotelop
Yahoo: csotelop
MSN: carlos.sotelo.pi...@gmail.com
GTalk: carlos.sotelo.pi...@gmail.com
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
GNULinux RU #379182 || GNULinux RM #277661

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: admin route is not working

2011-04-12 Thread Oldskool
Hello Carlos,

> // Set default controller routes
> Router::connect('/admin', array('controller' => 'dashboard', 'action' =>
> 'index', 'admin' => true));

I think this route is impacting the admin routing of cake itself. You
are setting /admin as a route and are setting admin = true on the same
line, which confuses me. You seem to be using Cake's admin routing but
are defining your own admin route aswell? I think you need to either
choose one or the other.

Could you try something else here like /management or similar to see
if the problem still persists?

Kind regards,
Jan Dorsman

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: admin route is not working

2011-04-11 Thread Carlos Eduardo Sotelo Pinto
Hi Tilen

Thanks for your answer, well. Itwas working but I had had to edit /add this
lines

Router::connect('/:language', array('controller' => 'nodes', 'action' =>
'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
Router::connect('/:language/:controller/:action/*', array(),
array('language' => '[a-z]{3}'));
and then the routes stop working, bring me  on thsi way

 mysite.com/admin => mysite.com/lng  ( lng is the active language )









-- 

>  Carlos Eduardo Sotelo Pinto
> PHP Senior Web Developer
> Cell (preferred): (Mov)+51, 959980794 :: (Claro)+51, 952707662
> http://www.csotelo.org
> Skype: csotelop
> Yahoo: csotelop
> MSN: carlos.sotelo.pi...@gmail.com
> GTalk: carlos.sotelo.pi...@gmail.com
> GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
> GNULinux RU #379182 || GNULinux RM #277661
>
>


-- 
 Carlos Eduardo Sotelo Pinto
PHP Senior Web Developer
Cell (preferred): (Mov)+51, 959980794 :: (Claro)+51, 952707662
http://www.csotelo.org
Skype: csotelop
Yahoo: csotelop
MSN: carlos.sotelo.pi...@gmail.com
GTalk: carlos.sotelo.pi...@gmail.com
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
GNULinux RU #379182 || GNULinux RM #277661

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: admin route is not working

2011-04-11 Thread Tilen Majerle
do you use cake 1.3?...if so enable Routing prefixes in
app/config/core.php


i saw one mistake probably: Router::connect('/:device', array('controller'
=> 'nodes', 'action' => 'display', 'type' => 'page'), array('language' =>
'[a-z]{3}'));

should be: Router::connect('/:device', array('controller' => 'nodes',
'action' => 'display', 'type' => 'page'), array('device' => '[a-z]{3}'));
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/4/11 Carlos Eduardo Sotelo Pinto 

> Hi people
>
> I am attaching my routes.php file, the problem is
>
> When I go to mysite.com/admin it is redirected to mysite.com/lng  ( lng is
> the active language )
>
> Thanks
>
> // Basic route
> Router::connect('/', array('controller' => 'nodes', 'action' =>
> 'display'));
>
> // Default page routes
> Router::connect('/page', array('controller' => 'nodes', 'action' =>
> 'display', 'type' => 'page'));
> Router::connect('/page/:slug', array('controller' => 'nodes', 'action' =>
> 'view', 'type' => 'page'));
> Router::connect('/:language/page', array('controller' => 'nodes', 'action'
> => 'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
> Router::connect('/:language/page/:slug', array('controller' => 'nodes',
> 'action' => 'view', 'type' => 'page'), array('language' => '[a-z]{3}'));
> Router::connect('/:device/:language/page', array('controller' => 'nodes',
> 'action' => 'display', 'type' => 'page'), array('language' => '[a-z]{3}',
> 'device' => '[a-z]{2}'));
> Router::connect('/:device/:language/page/:slug', array('controller' =>
> 'nodes', 'action' => 'view', 'type' => 'page'), array('language' =>
> '[a-z]{3}', 'device' => '[a-z]{2}'));
>
> // Default blog routes
> Router::connect('/blog', array('controller' => 'nodes', 'action' =>
> 'display', 'type' => 'post'));
> Router::connect('/blog/:slug', array('controller' => 'nodes', 'action' =>
> 'view', 'type' => 'post'));
> Router::connect('/:language/blog', array('controller' => 'nodes', 'action'
> => 'display', 'type' => 'post'), array('language' => '[a-z]{3}'));
> Router::connect('/:language/blog/:slug', array('controller' => 'nodes',
> 'action' => 'view', 'type' => 'post'), array('language' => '[a-z]{3}'));
> Router::connect('/:device/:language/blog', array('controller' => 'nodes',
> 'action' => 'display', 'type' => 'post'), array('language' => '[a-z]{3}',
> 'device' => '[a-z]{2}'));
> Router::connect('/:device/:language/blog/:slug', array('controller' =>
> 'nodes', 'action' => 'view', 'type' => 'post'), array('language' =>
> '[a-z]{3}', 'device' => '[a-z]{2}'));
>
> // Default news routes
> Router::connect('/news', array('controller' => 'nodes', 'action' =>
> 'display', 'type' => 'news'));
> Router::connect('/news/:slug', array('controller' => 'nodes', 'action' =>
> 'view', 'type' => 'news'));
> Router::connect('/:language/news', array('controller' => 'nodes', 'action'
> => 'display', 'type' => 'news'), array('language' => '[a-z]{3}'));
> Router::connect('/:language/news/:slug', array('controller' => 'nodes',
> 'action' => 'view', 'type' => 'news'), array('language' => '[a-z]{3}'));
> Router::connect('/:device/:language/news', array('controller' => 'nodes',
> 'action' => 'display', 'type' => 'news'), array('language' => '[a-z]{3}',
> 'device' => '[a-z]{2}'));
> Router::connect('/:device/:language/news/:slug', array('controller' =>
> 'nodes', 'action' => 'view', 'type' => 'news'), array('language' =>
> '[a-z]{3}', 'device' => '[a-z]{2}'));
>
> // Set default controller routes
> Router::connect('/admin', array('controller' => 'dashboard', 'action' =>
> 'index', 'admin' => true));
>
> // Language route
> Router::connect('/:language', array('controller' => 'nodes', 'action' =>
> 'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
> Router::connect('/:language/:controller/:action/*', array(),
> array('language' => '[a-z]{3}'));
>
> // Device route
> Router::connect('/:device', array('controller' => 'nodes', 'action' =>
> 'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
> Router::connect('/:device/:controller/:action/*',array(),array('device' =>
> '[a-z]{2}'));
>
>
> --
> Carlos Eduardo Sotelo Pinto
> PHP Senior Web Developer
> Cell (preferred): (Mov)+51, 959980794 :: (Claro)+51, 952707662
> http://www.csotelo.org
> Skype: csotelop
> Yahoo: csotelop
> MSN: carlos.sotelo.pi...@gmail.com
> GTalk: carlos.sotelo.pi...@gmail.com
> GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
> GNULinux RU #379182 || GNULinux RM #277661
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakeP

admin route is not working

2011-04-11 Thread Carlos Eduardo Sotelo Pinto
Hi people

I am attaching my routes.php file, the problem is

When I go to mysite.com/admin it is redirected to mysite.com/lng  ( lng is
the active language )

Thanks

// Basic route
Router::connect('/', array('controller' => 'nodes', 'action' => 'display'));

// Default page routes
Router::connect('/page', array('controller' => 'nodes', 'action' =>
'display', 'type' => 'page'));
Router::connect('/page/:slug', array('controller' => 'nodes', 'action' =>
'view', 'type' => 'page'));
Router::connect('/:language/page', array('controller' => 'nodes', 'action'
=> 'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
Router::connect('/:language/page/:slug', array('controller' => 'nodes',
'action' => 'view', 'type' => 'page'), array('language' => '[a-z]{3}'));
Router::connect('/:device/:language/page', array('controller' => 'nodes',
'action' => 'display', 'type' => 'page'), array('language' => '[a-z]{3}',
'device' => '[a-z]{2}'));
Router::connect('/:device/:language/page/:slug', array('controller' =>
'nodes', 'action' => 'view', 'type' => 'page'), array('language' =>
'[a-z]{3}', 'device' => '[a-z]{2}'));

// Default blog routes
Router::connect('/blog', array('controller' => 'nodes', 'action' =>
'display', 'type' => 'post'));
Router::connect('/blog/:slug', array('controller' => 'nodes', 'action' =>
'view', 'type' => 'post'));
Router::connect('/:language/blog', array('controller' => 'nodes', 'action'
=> 'display', 'type' => 'post'), array('language' => '[a-z]{3}'));
Router::connect('/:language/blog/:slug', array('controller' => 'nodes',
'action' => 'view', 'type' => 'post'), array('language' => '[a-z]{3}'));
Router::connect('/:device/:language/blog', array('controller' => 'nodes',
'action' => 'display', 'type' => 'post'), array('language' => '[a-z]{3}',
'device' => '[a-z]{2}'));
Router::connect('/:device/:language/blog/:slug', array('controller' =>
'nodes', 'action' => 'view', 'type' => 'post'), array('language' =>
'[a-z]{3}', 'device' => '[a-z]{2}'));

// Default news routes
Router::connect('/news', array('controller' => 'nodes', 'action' =>
'display', 'type' => 'news'));
Router::connect('/news/:slug', array('controller' => 'nodes', 'action' =>
'view', 'type' => 'news'));
Router::connect('/:language/news', array('controller' => 'nodes', 'action'
=> 'display', 'type' => 'news'), array('language' => '[a-z]{3}'));
Router::connect('/:language/news/:slug', array('controller' => 'nodes',
'action' => 'view', 'type' => 'news'), array('language' => '[a-z]{3}'));
Router::connect('/:device/:language/news', array('controller' => 'nodes',
'action' => 'display', 'type' => 'news'), array('language' => '[a-z]{3}',
'device' => '[a-z]{2}'));
Router::connect('/:device/:language/news/:slug', array('controller' =>
'nodes', 'action' => 'view', 'type' => 'news'), array('language' =>
'[a-z]{3}', 'device' => '[a-z]{2}'));

// Set default controller routes
Router::connect('/admin', array('controller' => 'dashboard', 'action' =>
'index', 'admin' => true));

// Language route
Router::connect('/:language', array('controller' => 'nodes', 'action' =>
'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
Router::connect('/:language/:controller/:action/*', array(),
array('language' => '[a-z]{3}'));

// Device route
Router::connect('/:device', array('controller' => 'nodes', 'action' =>
'display', 'type' => 'page'), array('language' => '[a-z]{3}'));
Router::connect('/:device/:controller/:action/*',array(),array('device' =>
'[a-z]{2}'));


-- 
Carlos Eduardo Sotelo Pinto
PHP Senior Web Developer
Cell (preferred): (Mov)+51, 959980794 :: (Claro)+51, 952707662
http://www.csotelo.org
Skype: csotelop
Yahoo: csotelop
MSN: carlos.sotelo.pi...@gmail.com
GTalk: carlos.sotelo.pi...@gmail.com
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
GNULinux RU #379182 || GNULinux RM #277661

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-28 Thread Miles J
I wrote a tutorial on how to use the Auth component. Its over 2 years
old but should still apply.

http://milesj.me/blog/read/5/Using-CakePHP%27s-Auth-Component

On Feb 27, 3:59 am, AD7six  wrote:
> On 26 feb, 20:53, amarradi  wrote:
>
> > i added an password from login into the mysql db and now i'm ready for
> > login
>
> > But where i set the hashing algorithm i dont know
>
> You don't need to think about that unless you need to change it.
>
> Assuming you haven't written a user registration function etc. yet I'd
> suggest:
>
> set debug to 2
> try logging in with whatever username and password you want
> look at the sql log
> insert/edit a user in the db matching the query that cake generated.
>
> thereafter you want to be looking at isAuthorized probably (check the
> book)
>  e.g.https://github.com/AD7six/skel/blob/master/app_controller.php#L223
>
> AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-27 Thread AD7six


On 26 feb, 20:53, amarradi  wrote:
> i added an password from login into the mysql db and now i'm ready for
> login
>
> But where i set the hashing algorithm i dont know

You don't need to think about that unless you need to change it.

Assuming you haven't written a user registration function etc. yet I'd
suggest:

set debug to 2
try logging in with whatever username and password you want
look at the sql log
insert/edit a user in the db matching the query that cake generated.

thereafter you want to be looking at isAuthorized probably (check the
book)
 e.g. https://github.com/AD7six/skel/blob/master/app_controller.php#L223

AD

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread Sam Sherlock
also see the book.cakephp.org
http://book.cakephp.org/view/1254/Change-Hash-Function

 - S




On 26 February 2011 19:53, amarradi  wrote:

> i added an password from login into the mysql db and now i'm ready for
> login
>
> But where i set the hashing algorithm i dont know
>
> On 26 Feb., 20:37, acl68  wrote:
> > Hi Marcus,
> >
> > I tried a lot, too , until it finally worked, it is not really simple.
> Which
> > kind of password hashing do you use?
> > Try to  debug output the password from the db and the hashed password you
> give
> > at the login form.
> >
> > Anja
> >
> > Am Samstag, 26. Februar 2011, um 20:21:16 schrieb amarradi:
> >
> > > Thanks a lot,
> >
> > > I tryed this video tutorial
> > >http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_au.
> ..
> > > cation_component_tutorial_-_administrator_login This System runs also
> under
> > > 1.3.7. But the login doesn't work
> >
> > > On 26 Feb., 20:08, acl68  wrote:
> > > > Hi Marcus,
> >
> > > > you have no password automatically set. Cake is a framework an not an
> > > > WCMS. You can code a user authenitication and autheticated users can
> be
> > > > allowed to use the admin methods, but when you start you have no
> values,
> > > > no passwords, no login.
> >
> > > > Have a look
> > > > here:
> http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> > > > This is based on cake 1.2 but should work for 1.3, too.
> >
> > > > Hope that helps!
> >
> > > > Anja
> >
> > > > Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> > > > > Hello together,
> >
> > > > > when i add the admin routing to my Application, where did i set the
> > > > > Password for Admin. Or an other Question. Whats the
> standard-Password
> > > > > for Admin?
> >
> > > > > Many greetings
> > > > > Marcus Radisch
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread amarradi
i added an password from login into the mysql db and now i'm ready for
login

But where i set the hashing algorithm i dont know

On 26 Feb., 20:37, acl68  wrote:
> Hi Marcus,
>
> I tried a lot, too , until it finally worked, it is not really simple. Which
> kind of password hashing do you use?
> Try to  debug output the password from the db and the hashed password you give
> at the login form.
>
> Anja
>
> Am Samstag, 26. Februar 2011, um 20:21:16 schrieb amarradi:
>
> > Thanks a lot,
>
> > I tryed this video tutorial
> >http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_au...
> > cation_component_tutorial_-_administrator_login This System runs also under
> > 1.3.7. But the login doesn't work
>
> > On 26 Feb., 20:08, acl68  wrote:
> > > Hi Marcus,
>
> > > you have no password automatically set. Cake is a framework an not an
> > > WCMS. You can code a user authenitication and autheticated users can be
> > > allowed to use the admin methods, but when you start you have no values,
> > > no passwords, no login.
>
> > > Have a look
> > > here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> > > This is based on cake 1.2 but should work for 1.3, too.
>
> > > Hope that helps!
>
> > > Anja
>
> > > Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> > > > Hello together,
>
> > > > when i add the admin routing to my Application, where did i set the
> > > > Password for Admin. Or an other Question. Whats the standard-Password
> > > > for Admin?
>
> > > > Many greetings
> > > > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread amarradi
Where did i found the hashing algorithm

On 26 Feb., 20:37, acl68  wrote:
> Hi Marcus,
>
> I tried a lot, too , until it finally worked, it is not really simple. Which
> kind of password hashing do you use?
> Try to  debug output the password from the db and the hashed password you give
> at the login form.
>
> Anja
>
> Am Samstag, 26. Februar 2011, um 20:21:16 schrieb amarradi:
>
> > Thanks a lot,
>
> > I tryed this video tutorial
> >http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_au...
> > cation_component_tutorial_-_administrator_login This System runs also under
> > 1.3.7. But the login doesn't work
>
> > On 26 Feb., 20:08, acl68  wrote:
> > > Hi Marcus,
>
> > > you have no password automatically set. Cake is a framework an not an
> > > WCMS. You can code a user authenitication and autheticated users can be
> > > allowed to use the admin methods, but when you start you have no values,
> > > no passwords, no login.
>
> > > Have a look
> > > here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> > > This is based on cake 1.2 but should work for 1.3, too.
>
> > > Hope that helps!
>
> > > Anja
>
> > > Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> > > > Hello together,
>
> > > > when i add the admin routing to my Application, where did i set the
> > > > Password for Admin. Or an other Question. Whats the standard-Password
> > > > for Admin?
>
> > > > Many greetings
> > > > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread acl68
Hi Marcus,


I tried a lot, too , until it finally worked, it is not really simple. Which 
kind of password hashing do you use? 
Try to  debug output the password from the db and the hashed password you give 
at the login form.


Anja


Am Samstag, 26. Februar 2011, um 20:21:16 schrieb amarradi:
> Thanks a lot,
> 
> I tryed this video tutorial
> http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_authenti
> cation_component_tutorial_-_administrator_login This System runs also under
> 1.3.7. But the login doesn't work
> 
> On 26 Feb., 20:08, acl68  wrote:
> > Hi Marcus,
> > 
> > you have no password automatically set. Cake is a framework an not an
> > WCMS. You can code a user authenitication and autheticated users can be
> > allowed to use the admin methods, but when you start you have no values,
> > no passwords, no login.
> > 
> > Have a look
> > here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> > This is based on cake 1.2 but should work for 1.3, too.
> > 
> > Hope that helps!
> > 
> > Anja
> > 
> > Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> > > Hello together,
> > > 
> > > when i add the admin routing to my Application, where did i set the
> > > Password for Admin. Or an other Question. Whats the standard-Password
> > > for Admin?
> > > 
> > > Many greetings
> > > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread amarradi
Thanks a lot,

I tryed this video tutorial
http://tv.cakephp.org/video/jasonwydro/2011/01/29/cakephp_1_3_auth_authentication_component_tutorial_-_administrator_login
This System runs also under 1.3.7. But the login doesn't work



On 26 Feb., 20:08, acl68  wrote:
> Hi Marcus,
>
> you have no password automatically set. Cake is a framework an not an WCMS.
> You can code a user authenitication and autheticated users can be allowed to
> use the admin methods, but when you start you have no values, no passwords, no
> login.
>
> Have a look 
> here:http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
> This is based on cake 1.2 but should work for 1.3, too.
>
> Hope that helps!
>
> Anja
>
> Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
>
> > Hello together,
>
> > when i add the admin routing to my Application, where did i set the
> > Password for Admin. Or an other Question. Whats the standard-Password
> > for Admin?
>
> > Many greetings
> > Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Admin Route or Admin Password

2011-02-26 Thread acl68
Hi Marcus,

you have no password automatically set. Cake is a framework an not an WCMS. 
You can code a user authenitication and autheticated users can be allowed to 
use the admin methods, but when you start you have no values, no passwords, no 
login.

Have a look here:
http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
This is based on cake 1.2 but should work for 1.3, too.

Hope that helps!

Anja


Am Samstag, 26. Februar 2011, um 19:54:38 schrieb amarradi:
> Hello together,
> 
> when i add the admin routing to my Application, where did i set the
> Password for Admin. Or an other Question. Whats the standard-Password
> for Admin?
> 
> Many greetings
> Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Admin Route or Admin Password

2011-02-26 Thread amarradi
Hello together,

when i add the admin routing to my Application, where did i set the
Password for Admin. Or an other Question. Whats the standard-Password
for Admin?

Many greetings
Marcus Radisch

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


RE: Creating a route similar to the Admin route

2009-06-25 Thread Paul

What your looking for is routing prefixes ;-)

Basic run down here:

http://www.sanisoft.com/blog/2008/04/04/the-prefix-automagic-in-cakephp-rout
ing/

HTH,

Paul.

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of rpnu...@gmail.com
Sent: Friday, 26 June 2009 5:55 a.m.
To: CakePHP
Subject: Creating a route similar to the Admin route


This must be incredibly simple, but the Router docs are just waaay to
confusing for me.

I want to have :

website.com/admin/controller/action *connected to* controller/
admin_action (which is done by setting the value of Routing.admin to
'admin')

But, aside from having that, I also want to have:

website.com/mod/controller/action *connected to* controller/mod_action
(notice now it's 'mod', not 'admin')

I just can't seem to figure it out.

Any help will be greatly appreciated. Thanks!



__ Information from ESET NOD32 Antivirus, version of virus signature
database 4186 (20090624) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__ Information from ESET NOD32 Antivirus, version of virus signature
database 4186 (20090624) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Creating a route similar to the Admin route

2009-06-25 Thread rpnu...@gmail.com

This must be incredibly simple, but the Router docs are just waaay to
confusing for me.

I want to have :

website.com/admin/controller/action *connected to* controller/
admin_action (which is done by setting the value of Routing.admin to
'admin')

But, aside from having that, I also want to have:

website.com/mod/controller/action *connected to* controller/mod_action
(notice now it's 'mod', not 'admin')

I just can't seem to figure it out.

Any help will be greatly appreciated. Thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



cake bake all with admin route?

2009-04-01 Thread Mech7

Is there a way to do bake all with admin?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Consolidating optional admin route

2007-12-22 Thread Adam Royle

Well, it doesn't make much sense if you combine the two, as you'll end
up passing 'prefix' => 'admin' on the non-admin calls. This will screw
around with any auth code you have that uses this prefix.

I generally don't worry about routing admin functions, as it is only a
few clients who see it, and therefore the whole "easy to remember" and
"seo-friendly" aspects are irrelevant.

Adam

On Dec 22, 8:22 am, Joel Stein <[EMAIL PROTECTED]> wrote:
> Quick question... I'm trying to assign a route to a controller, both
> in the case of admin urls and without.  Is there an easy way to
> consolidate these two lines?
>
> Router::connect('/admin/bulletin/:action/*', array('plugin' =>
> 'newsletter', 'controller' => 'newsletter', 'prefix' => 'admin'));
> Router::connect('/bulletin/:action/*', array('plugin' => 'newsletter',
> 'controller' => 'newsletter'));
>
> I thought something like this might work, but didn't know how to
> finish it:
>
> Router::connect('/(admin/)?bulletin/:action/*', array('plugin' =>
> 'newsletter', 'controller' => 'newsletter', 'prefix' => 'admin'));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Consolidating optional admin route

2007-12-21 Thread Joel Stein

Quick question... I'm trying to assign a route to a controller, both
in the case of admin urls and without.  Is there an easy way to
consolidate these two lines?

Router::connect('/admin/bulletin/:action/*', array('plugin' =>
'newsletter', 'controller' => 'newsletter', 'prefix' => 'admin'));
Router::connect('/bulletin/:action/*', array('plugin' => 'newsletter',
'controller' => 'newsletter'));

I thought something like this might work, but didn't know how to
finish it:

Router::connect('/(admin/)?bulletin/:action/*', array('plugin' =>
'newsletter', 'controller' => 'newsletter', 'prefix' => 'admin'));
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: manually configuring admin route in routes.php

2007-10-01 Thread Joel Stein

Okay, just found out a solution in IRC, for anyone who wants to know:

Router::connect('/admin/best-practices/:action/*', array('controller'
=> 'best_practices', 'prefix' => 'admin'));


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



manually configuring admin route in routes.php

2007-10-01 Thread Joel Stein

Howdy, bakers.  I have a quick routing question.  How can I manually
configure a route so that it knows it is an admin route?  Here's what
I have, but it's not recognizing it's "admin"-ability:

Router::connect('/admin/best-practices/:action/*', array('controller'
=> 'best_practices'));

Basically, I'm trying to make my URLs have dashes, instead of
underscores, and so I can't use the automatic routes.  Any ideas?
Thanks in advance!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Error with admin route and using $form->create()

2007-09-08 Thread alanclic

It was a bug that was fixed on the last nightly build.

Thanks

On 8 set, 12:16, alanclic <[EMAIL PROTECTED]> wrote:
> I setted CAKE_ADMIN as 'admin', and everywhere i use $form->create(),
> i get anoticefrom CAKEPHP.
>
> for example in one view i use $form->create('User', array('action' =>
> 'login')), without theadminrouteit works just fine.
>
> the notices are:
>
> Notice(8): Undefined index:  plugin [CORE\cake\libs\router.php, line
> 747]
> Undefined index:  controller [CORE\cake\libs\router.php, line 747]
>
> Router::mapRouteElements() - CORE\cake\libs\router.php, line 747
> Router::url() - CORE\cake\libs\router.php, line 599
> Helper::url() - CORE\cake\libs\view\helper.php, line 183
> FormHelper::create() - CORE\cake\libs\view\helpers\form.php, line 190
> include - CORE\app\views\users\login.ctp, line 22
> View::_render() - CORE\cake\libs\view\view.php, line 777
> View::render() - CORE\cake\libs\view\view.php, line 337
> Controller::render() - CORE\cake\libs\controller\controller.php, line
> 667
> Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 291
> Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 257
> [main] - CORE\app\webroot\index.php, line 84
>
> CONTEXT:
> $route =   array(0 => "/:admin/:controller/:action/*", 1 => "/^(?:\/(?:
> (admin)(?:\/([a-zA-Z0-9_\-\.\;\:]+)(?:\/([a-zA-Z0-9_\-\.\;\:]+)(?:[\/
> \?](.*))?)?)?))[\/]*$/", 2 => array, 3 => array)
> $url=   array("plugin" => null, "id" => false, "controller" => 
> "users",
> "action" => "login")
> $_this  =   array("routes" => array, "__admin" => null,
> "__parseExtensions" => false, "__validExtensions" => null, "__named"
> => array, "__currentRoute" => array, "__headerMap" => array,
> "__resourceMap" => array, "__resourceMapped" => array, "__params" =>
> array, "__paths" => array, "__mapped" => array, "_log" => null)
> $defaults   =   array()
> $params =   array("controller" => "users", "plugin" => null, "action" =>
> "login", "id" => false)
> $routeParams=   array(0 => "admin", 1 => "controller", 2 => "action")
> $pass   =   array()
> $value  =   false
> $key=   "id"
> $required   =   array()
>
> CODE:
>  return false;
>
> }
>
> } else {
>
> if (empty($required) && $defaults['plugin'] ==
> $url['plugin'] && $defaults['controller'] == $url['controller'] &&
> $defaults['action'] == $url['action']) {
>
> return array(Router::__mapRoute($route, am($url,
> compact('pass'))), $url);
>
> It looks like it's looking for an action withadminrouting..
>
> Thanks!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Different layout for admin route?

2007-07-13 Thread Travis Cline

On Jul 12, 6:07 pm, Geoff Ford <[EMAIL PROTECTED]> wrote:
> I would use a beforeFilter and test for $this->params['admin'];
>
> function beforeFilter(){
>   if (isset($this->params['admin'])) {
> $this->layout = 'admin_layout_name';
>   }
>
> }
>
> Geoff
> --http://lemoncake.wordpress.com

Yeah, that's cleaner.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Different layout for admin route?

2007-07-12 Thread Geoff Ford

I would use a beforeFilter and test for $this->params['admin'];

function beforeFilter(){
  if (isset($this->params['admin'])) {
$this->layout = 'admin_layout_name';
  }
}

Geoff
--
http://lemoncake.wordpress.com

On Jul 13, 7:33 am, Travis Cline <[EMAIL PROTECTED]> wrote:
> On Jul 12, 3:17 pm, Mech7 <[EMAIL PROTECTED]> wrote:
>
> > Yes but is it possible to do this for all admin pages?
>
> > On Jul 12, 8:45 pm, Michael Augustyniak <[EMAIL PROTECTED]>
> > wrote:
>
> > > Mech7 wrote:
> > > > I am using the /admin for tasks like editing / adding / deleting only
> > > > I am wondering is it possible to automatically load a different layout
> > > > for the the admin instead of the default.ctp?
>
> > > this is whta U look for
> > > $this->layout = 'name';
>
> A simple approach is in a beforeFilter in your AppController, check
> the action name and if it starts with 'admin_' switch to admin layout.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Different layout for admin route?

2007-07-12 Thread Travis Cline

On Jul 12, 3:17 pm, Mech7 <[EMAIL PROTECTED]> wrote:
> Yes but is it possible to do this for all admin pages?
>
> On Jul 12, 8:45 pm, Michael Augustyniak <[EMAIL PROTECTED]>
> wrote:
>
> > Mech7 wrote:
> > > I am using the /admin for tasks like editing / adding / deleting only
> > > I am wondering is it possible to automatically load a different layout
> > > for the the admin instead of the default.ctp?
>
> > this is whta U look for
> > $this->layout = 'name';

A simple approach is in a beforeFilter in your AppController, check
the action name and if it starts with 'admin_' switch to admin layout.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Different layout for admin route?

2007-07-12 Thread Mech7

Yes but is it possible to do this for all admin pages?

On Jul 12, 8:45 pm, Michael Augustyniak <[EMAIL PROTECTED]>
wrote:
> Mech7 wrote:
> > I am using the /admin for tasks like editing / adding / deleting only
> > I am wondering is it possible to automatically load a different layout
> > for the the admin instead of the default.ctp?
>
> this is whta U look for
> $this->layout = 'name';


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Different layout for admin route?

2007-07-12 Thread Michael Augustyniak

Mech7 wrote:
> I am using the /admin for tasks like editing / adding / deleting only
> I am wondering is it possible to automatically load a different layout
> for the the admin instead of the default.ctp?
>
>
> >
>
>   
this is whta U look for
$this->layout = 'name';

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Different layout for admin route?

2007-07-12 Thread Mech7

I am using the /admin for tasks like editing / adding / deleting only
I am wondering is it possible to automatically load a different layout
for the the admin instead of the default.ctp?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Default admin route

2007-04-23 Thread Nemanja Čorlija
On 4/23/07, jitka <[EMAIL PROTECTED]> wrote:
>
> $Route->connect('/'.CAKE_ADMIN, array('controller'=>'products',
> 'action'=>'index', CAKE_ADMIN => CAKE_ADMIN));
>
Works great. Thank you!

-- 
Nemanja Čorlija <[EMAIL PROTECTED]>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Default admin route

2007-04-23 Thread jitka

$Route->connect('/'.CAKE_ADMIN, array('controller'=>'products',
'action'=>'index', CAKE_ADMIN => CAKE_ADMIN));


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Default admin route

2007-04-23 Thread Nemanja

Hi,

I'm trying to setup a default admin route. Something that would be
equivalent to

$Route->connect('/', array('controller' => 'pages', 'action' =>
'display', 'home'));

What I have at the moment is:

$Route->connect('/'.CAKE_ADMIN, array('controller'=>'products',
'action'=>CAKE_ADMIN.'_index'));

But when I got to mysite.com/admin, I get this error:

You are seeing this error because the private class method admin_index
should not be accessed directly

I don't quite understand what that means nor how can I achieve what I
expected this route would do. Any help is greatly appreciated since
search didn't return any helpful results.

Thanks


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-10-05 Thread twinkletoes

Thanks for a pointer in the right direction, nate :)

I got error messages when trying your solution, but they were fixed
easily by doing a few additions:

public function beforeFilter ()
{
if (isset($this->params["admin"]))
{
$this->Security->requireLogin(
'*',
array(
'users' => array(
"username" => "password"),
'type' => 'basic'));
}

} // end of function beforeFilter

On Sep 14, 11:04 pm, "nate" <[EMAIL PROTECTED]> wrote:
[...]
>You can activate it by doing the following:

> class AppController extends Controller {
> var $components = array("Security");

> function beforeFilter( ) {
> if ($this->params["admin"]) {
> $this->Security->requireLogin("*", array('users' =>
> array("admin" => "password")));
> }
> }

[...]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-10-04 Thread twinkletoes

$this->params["styre"] should of course be $this->params["admin"] (or
whichever admin route prefix you use).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-10-04 Thread twinkletoes

$this->params["styre"] should of course be $this->params["admin"] (or
whichever admin route prefix you use).

On Oct 4, 9:52 pm, "twinkletoes" <[EMAIL PROTECTED]> wrote:
> Thanks for a pointer in the right direction, nate :)
>
> I got error messages when trying your solution, but they were fixed
> easily by doing a few additions:
>
> public function beforeFilter ()
> {
> if (isset($this->params["styre"]))
> {
> $this->Security->requireLogin(
> '*',
> array(
> 'users' => array(
> "risdriv" => "phey3oi"),
> 'type' => 'basic'));
> }
>
> } // end of function beforeFilterOn Sep 14, 11:04 pm, "nate" <[EMAIL 
> PROTECTED]> wrote:
> [...]>You can activate it by doing the following:
>
> > class AppController extends Controller {
> > var $components = array("Security");
>
> > function beforeFilter( ) {
> > if ($this->params["admin"]) {
> > $this->Security->requireLogin("*", array('users' =>
> > array("admin" => "password")));
> > }
> > }[...]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-10-04 Thread twinkletoes

Thanks for a pointer in the right direction, nate :)

I got error messages when trying your solution, but they were fixed
easily by doing a few additions:

public function beforeFilter ()
{
if (isset($this->params["styre"]))
{
$this->Security->requireLogin(
'*',
array(
'users' => array(
"risdriv" => "phey3oi"),
'type' => 'basic'));
}
} // end of function beforeFilter

On Sep 14, 11:04 pm, "nate" <[EMAIL PROTECTED]> wrote:
[...]
>You can activate it by doing the following:
>
> class AppController extends Controller {
> var $components = array("Security");
>
> function beforeFilter( ) {
> if ($this->params["admin"]) {
> $this->Security->requireLogin("*", array('users' =>
> array("admin" => "password")));
> }
> }
[...]


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-09-15 Thread purepear

Thanks nate.

I did similar thing with Sd_Auth but HTTP authentication sounds
better.. i'll try this one.

I think this is as simple as protecting /admin folder through host's
ControlPanel or .htaccess file. So this topic might help people who
want simple(no database) single user(admin) protection.

Best regards.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: ADMIN route and password-protection with http authentification

2006-09-14 Thread nate

If it is true, that's an awefully poor way of doing it.  The Cake 1.2
Security component (which you can grab form here:
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/controller/components/security.php
- just drop it in app/controllers/components to replace the Cake 1.1
version) has a requireLogin method, which implements HTTP basic
authentication.  You can activate it by doing the following:

class AppController extends Controller {
var $components = array("Security");

function beforeFilter( ) {
if ($this->params["admin"]) {
$this->Security->requireLogin("*", array('users' =>
array("admin" => "password")));
}
}
}

The "*" in the first parameter means to require the login for all
actions.  The method also allows you to specify a list of actions to be
protected.  You can add as many name/password pairs as you want to the
'users' array.  Alternatively, you can use Model::generateList to load
usernames and passwords from a database.

The final version of the 1.2 Security component will also handle HTTP
digest authentication, so you can use md5-hashed passwords as well as
plain text passwords.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



ADMIN route and password-protection with http authentification

2006-09-14 Thread purepear

Hi,

there was a post that says:

"One, as far as I know, undocumented advantage with admin routes is
that
you can easily password-protect them with http authentification. If you
set up .htaccess to password-protect a directory called 'admin' in your
root directory (so alongside 'cake' and 'app') then all of your admin
routes will have this simple form of protection."  by meek

So i'm wondering.. is this true?

I tried it with /admin directory with .htaccess in it and .htpasswd ...
which works but instead of entering the admin section i'm getting in
the /admin directory.

Then i deleted the /admin dir and set

  ( the content of the .htaccess file that was in the /admin dir)

In this case my admin section works but it's not password-protected.

Any other way to do the protection with http autentification ?

thanks.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Admin Route

2006-07-20 Thread cammo

Yep that fixed it, thanks again


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Admin Route

2006-07-20 Thread cammo

Thanks John,
Will give it a try


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Admin Route

2006-07-20 Thread John Zimmerman [gmail]
I have the same kind of setup going except that my 'admin_controller.php' is actually called 'administrators_controller.php'My route looks like
$Route->connect('/admin', array('controller' =>'administrators', 'action' =>'index'));I have no problems using it this way, and I maintain administrators seperate from other users so in my case 'administrators' makes sense, since there can be multiple administrators.
CakePHP is probably having a problem with routing with admin routes enabled along with the index action of your admin controller.My guess is that your best option would be to rename your admin_controller.php to administrators_controller.php.  I know that works at least.
On 7/20/06, cammo <[EMAIL PROTECTED]> wrote:
Hi There,I am able to get the admin route to work for everything except for thehttp://path/to/admin/ I can get it to work forhttp://path/to/admin/users
 http://path/to/admin/add etc... but not thedefault admin path. I tried adding a route to the routes.php file$Route->connect('/admin', array('controller' => 'admin', 'action' =>
'index'));I have an admin controller and an index funtion and view but it comesup with address not found, has anybody had this problem before?Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Admin Route

2006-07-20 Thread cammo

Hi There,
I am able to get the admin route to work for everything except for the
http://path/to/admin/ I can get it to work for
http://path/to/admin/users http://path/to/admin/add etc... but not the
default admin path. I tried adding a route to the routes.php file

$Route->connect('/admin', array('controller' => 'admin', 'action' =>
'index'));

I have an admin controller and an index funtion and view but it comes
up with address not found, has anybody had this problem before?

Thanks in advance


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---