|
|
@ -165,12 +165,10 @@ interface ManagerInterface |
|
|
|
* |
|
|
|
* |
|
|
|
* @param Role $role |
|
|
|
* @param Role $role |
|
|
|
* @param string|integer $userId the user ID (see [[\yii\web\User::id]]) |
|
|
|
* @param string|integer $userId the user ID (see [[\yii\web\User::id]]) |
|
|
|
* @param Rule $rule the rule to be associated with this assignment. If not null, the rule |
|
|
|
|
|
|
|
* will be executed when [[allow()]] is called to check the user permission. |
|
|
|
|
|
|
|
* @return Assignment the role assignment information. |
|
|
|
* @return Assignment the role assignment information. |
|
|
|
* @throws \Exception if the role has already been assigned to the user |
|
|
|
* @throws \Exception if the role has already been assigned to the user |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function assign($role, $userId, $rule = null); |
|
|
|
public function assign($role, $userId); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Revokes a role from a user. |
|
|
|
* Revokes a role from a user. |
|
|
|