authorization to perform update, delete and view

Hello friends,

I have successfully login as an admin with the database table, the code is as follows…

private $_id;

public function authenticate()


{





	$record=AdminUser::model()->findByAttributes(array('username'=>$this->username));  // here I use Email as user name which comes from database


	if($record===null)


           {


                   $this->_id='user Null';


                   $this->errorCode=self::ERROR_USERNAME_INVALID;


           }


    else if($record->password!==$this->password)            // here I compare db password with passwod field


           {        $this->_id=$this->username;


                    $this->errorCode=self::ERROR_PASSWORD_INVALID;


    





     else


   {  


       $this->_id=$record['username'];


       //$this->setState('title', $record['E_NAME']);


       $this->errorCode=self::ERROR_NONE;





   }





    return !$this->errorCode;

}

public function getId()       //  override Id

{

   return $this->_id;

}

admin_register.php

<?php

/* @var $this AdminUserController */

/* @var $model AdminUser */

$this->breadcrumbs=array(

'Admin Users'=&gt;array('index'),


'admin_register',

);

?>

<h1>Register Admin</h1>

<?php $this->renderPartial(’_form’, array(‘model’=>$model)); ?>

AdminUserController.php

public function actionAdmin_register()

{


	&#036;model=new AdminUser;





	// Uncomment the following line if AJAX validation is needed


	// &#036;this-&gt;performAjaxValidation(&#036;model);





	if(isset(&#036;_POST['AdminUser']))


	{


		&#036;model-&gt;attributes=&#036;_POST['AdminUser'];


		if(&#036;model-&gt;save())


			&#036;this-&gt;redirect(array('view','id'=&gt;&#036;model-&gt;admin_id));


	}





	&#036;this-&gt;render('admin_register',array(


		'model'=&gt;&#036;model,


	));


}

public function accessRules()

{


	return array(


		array('allow',  // allow all users to perform 'index' and 'view' actions


			'actions'=&gt;array('index','view','admin_register'),


			'users'=&gt;array('@'),


		),


		array('allow', // allow authenticated user to perform 'create' and 'update' actions


			'actions'=&gt;array('update','admin_register'),


			'users'=&gt;array('admin'),


		),


		array('allow', // allow admin user to perform 'admin' and 'delete' actions


			'actions'=&gt;array('admin','delete'),


			'users'=&gt;array('admin'),


		),


		array('deny',  // deny all users


			'users'=&gt;array('*'),


		),


	);


}

I am not being able to create , update and delete the records, my admin_user table has only 2 records, Please any body tell me ,

hello friends…

my access rule code is.

public function accessRules()

{


	return array(


		


		array('allow', // allow authenticated user to perform 'create' and 'update' and 'delete' actions


			'actions'=&gt;array('view','index','update','admin_register','delete'),


			'users'=&gt;array('@'),


		),


		


		array('deny',  // deny all users


			'users'=&gt;array('*'),


		),


	);


}

with this code, i am not being able to manage the records after successful login