Hi,

I think you are talking about ACL, not
authentication. $this->Auth->userScope used as condition while doing login
and it doesn't provide mechanism to access or deny particular user to
particular page.

Hope that helps.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Fri, Feb 11, 2011 at 11:07 AM, zero00 <jmejia...@gmail.com> wrote:

> Ok so the problem is that i have users who are admins and users who are
> not.
> but the users who dont have admin acess which is represent by 0 on the db
> still get on it
>
> //Database
>
> DB T Schema:
>        id
>        username  varchar
>        password  varchar
>        admin       tiny_int(1)
>
> //Controller class
>
> class AdminsController extends AppController {
>     var $name = 'Admins';
>     var $uses = array('User');
>
>     function beforeFilter() {
>         parent::beforeFilter();
>         $this->Auth->loginAction = array('controller' => 'admins', 'action'
> => 'login');
>         $this->Auth->userScope = array('User.admin' => '1');
>     }
>
> }
> ?>
>
> Thanks in advance
>
> --
> 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

Reply via email to