Skip to content

Instantly share code, notes, and snippets.

@rishav
Created February 22, 2012 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rishav/1884676 to your computer and use it in GitHub Desktop.
Save rishav/1884676 to your computer and use it in GitHub Desktop.
if(Yii::app()->user->isSuperuser)
$type=$_POST['Type'];</div>
else
 $type='User';
$authorizer = Yii::app()-&gt;getModule("rights")-&gt;getAuthorizer();
$authorizer-&gt;authManager-&gt;assign($type, $model-&gt;id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment