Problems With Automatic Generation Of Crud

Hi people, I’m begginer on Yii Framework, but I like that!

The problem is: I created 3 tables on database in MySQL: “User”, “Mensagem”, “Projeto”. So I’ve executed

protected/yiic shell

and entry with the commands:

model User

model Mensagem

model Projeto

crud User

crud Mensagem

crud Projeto

Generated with success. But with any of three, the control redirect to site/login.

For example: ?r=user

It list the users. But when I go to ?r=user/create or ?r=user/admin redirects to site/login.

My db string connection is correctly configured, because list the users presents on table correctly. I tried modify the scripts, but don’t work. I’ll wonder if you may help me.

Take a look at the controllers accessrules.

Only for authenticated users, the actions update, create, delete is allowed.

Oh! Thanks