Yii Framework Forum: Chapter 8: rbac tables - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 8: rbac tables

#1 User is offline   totoide 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 01-November 10

Posted 01 November 2010 - 06:50 PM

Hi - I am learning so much, so quickly from this book and I'm stoked.

Unfortunately I'm a total newbie and cannot get the rbac shell command to work. Instead of spending time trying to get the command to work, could I get away with just INSERTing data directly into the rbac tables? If so, does anybody have a csv file with the data (or something I can import / insert data with) ? I don't understand enough of the RbacCommand.php file to know what the data looks like.

Many thanks in advance.
0

#2 User is offline   jefftulsa 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 168
  • Joined: 06-October 08
  • Location:Austin, TX

Posted 03 November 2010 - 08:31 AM

Here are some insert statements that might help move you along:

INSERT INTO `AuthItem` VALUES ('admin',2,'',NULL,'N;',NULL),('adminManagement',1,'access to the application administration functionality',NULL,'N;',NULL),('createIssue',0,'create a new issue',NULL,'N;',NULL),('createProject',0,'create a new project',NULL,'N;',NULL),('createUser',0,'create a new user',NULL,'N;',NULL),('deleteIssue',0,'delete an issue from a project',NULL,'N;',NULL),('deleteProject',0,'delete a pro-ject',NULL,'N;',NULL),('deleteUser',0,'remove a user from a project',NULL,'N;',NULL),('member',2,'',NULL,'N;',NULL),('owner',2,'',NULL,'N;',NULL),('reader',2,'',NULL,'N;',NULL),('readIssue',0,'read issue information',NULL,'N;',NULL),('readProject',0,'read project information',NULL,'N;',NULL),('readUser',0,'read user profile information',NULL,'N;',NULL),('updateIssue',0,'update issue information',NULL,'N;',NULL),('updateProject',0,'update project information',NULL,'N;',NULL),('updateUser',0,'update a users information',NULL,'N;',NULL);


INSERT INTO `AuthItemChild` VALUES ('admin','adminManagement'),('member','createIssue'),('owner','createProject'),('owner','createUser'),('member','deleteIssue'),('owner','deleteProject'),('owner','deleteUser'),('admin','member'),('owner','member'),('admin','owner'),('admin','reader'),('member','reader'),('owner','reader'),('reader','readIssue'),('reader','readProject'),('reader','readUser'),('member','updateIssue'),('owner','updateProject'),('owner','updateUser');

INSERT INTO `AuthAssignment` VALUES ('admin','1',NULL,'N;');

0

#3 User is offline   totoide 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 01-November 10

Posted 03 November 2010 - 04:14 PM

This is rad - thank you very much.

I actually got the rbac command to work last night. For anybody using Media Temple's grid service, you have to change the connectionString in the main.php config file so it points to their internal ip. This is different than the connection for the webapp.

This book is awesome!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users