Hey,
I have this RbacCommand.php file under the commands/shell directory:
public function run($args)
{
if (($this->_authManager = Yii::app()->authManager) === null)
{
echo "Error executing the run($args) function\n";
return;
}
echo "Would you like to continue?[Yes|No]";
if (!strncasecmp(trim(fgets(STDIN)), 'y',1))
{
$this->_authManager->clearAll();
$this->_authManager->createOperation("createUser" , "Create a new user" );
$this->_authManager->createOperation("readUser" , "Read user profile information");
$this->_authManager->createOperation("updateUser" , "Update user profile information");
$this->_authManager->createOperation("deleteUser" , "Delete a user from a group");
$this->_authManager->createOperation("createGroup" , "Create a new group");
$this->_authManager->createOperation("readGroup" , "Read group information");
$this->_authManager->createOperation("updateGroup" , "Update group information");
$this->_authManager->createOperation("deleteGroup" , "Delete a group");
$this->_authManager->createOperation("createDiscussion" , "Create a new Discussion");
$this->_authManager->createOperation("readDiscussion" , "Read Discussion information");
$this->_authManager->createOperation("updateDiscussion" , "Update Discussion information");
$this->_authManager->createOperation("deleteDiscussion" , "Delete a Discussion from a project");
$role = $this->_authManager->createRole("reader");
$role->addChild('readUser');
echo "5555555555555555555555555555555555555555555555555555555555555555";
When I run the yiic shell at the CommandPrompt i get an error, and I found that the line that causes it is the last one before the “echo” - $role->addChild(‘readUser’);
Are my RBAC tables could be wrong?