Hi.
How can I create a bizrule that would allow access only if user is admin or he is the owner of the record?
Something like
return Yii::app()->user->role == 'admin' || Yii::app()->user->id==$params["model"]->userId;
Hi.
How can I create a bizrule that would allow access only if user is admin or he is the owner of the record?
Something like
return Yii::app()->user->role == 'admin' || Yii::app()->user->id==$params["model"]->userId;
anyone?..
return Yii::app()->user->checkAccess('admin') || Yii::app()->user->id==$params["model"]->userId;
Does this work?
Is it OK to use a bizrule in a bizrule?