clevertech / YiiBackboneBoilerplate

YiiBackboneBoilerplate
45 stars 21 forks source link

User access info #8

Open itsazzad opened 11 years ago

itsazzad commented 11 years ago

What is the default user access info in the frontend and backend? What is the username and password? What is the source of user information or where will I add new users? What is the data structure/schema of user information? What are the necessary steps for the user login to be worked?

luizmcarvalho commented 11 years ago

Hello,

Insert this in your two files:

/frontend/componentes/Controller.php and /backend/componentes/Controller.php

public function filters()
{
    return array( 'accessControl' ); // perform access control
}

public function accessRules()
{
    return array(
        // logged in users can do whatever they want to
        array('allow', 'users' => array('@')),
        // not logged in users can't do anything except above
        array('deny'),
    );
}

With that all controllers will allow actions are taken only by authenticated users.

Luiz Fernando M. de Carvalho Belo Horizonte - MG

2013/2/4 itsazzad notifications@github.com

What is the default user access info in the frontend and backend? What are the necessary steps for the user login to be worked?

— Reply to this email directly or view it on GitHubhttps://github.com/clevertech/YiiBackboneBoilerplate/issues/8.