views:

40

answers:

2

Hello friendz,
I have a new project with 4 users and some tasks which is only allowed to certain users.
Since the users and tasks are fixed i thought no need of using ACL.

is my decision is correct??

Then can i have multiple prefix for each users if yes how can i achive it??

I need to restrict the task of user A from user B how can i achive it???

+1  A: 

4 users is also a list. I would suggest you to use the INI-based ACL component if you don't need to change permissions on the fly.

bancer
A: 

Not especially elegant, but it should get the job done (in each relevant app_controller):

function beforeFilter()
{
    parent::beforeFilter();
    $currentUser = $this->Auth->user();
    $uName = $currentUser['User']['username'];

    switch($uName){
        case 'User_1':
            $this->Auth->allow('myAction');
    ...
Leo