Commit ed533172 by Alexander Makarov

Adjusted rbac ManagerInterface

parent 0b8c00da
......@@ -595,7 +595,7 @@ class DbManager extends BaseManager
/**
* @inheritdoc
*/
public function assign($role, $userId, $rule = null)
public function assign($role, $userId)
{
$assignment = new Assignment([
'userId' => $userId,
......
......@@ -165,12 +165,10 @@ interface ManagerInterface
*
* @param Role $role
* @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.
* @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.
......
......@@ -223,7 +223,7 @@ class PhpManager extends BaseManager
/**
* @inheritdoc
*/
public function assign($role, $userId, $ruleName = null)
public function assign($role, $userId)
{
if (!isset($this->items[$role->name])) {
throw new InvalidParamException("Unknown role '{$role->name}'.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment