Commit c8a50126 by Alexander Makarov

#4310: Removed `$data` from signature of `yii\rbac\ManagerInterface`

parent a18255ef
...@@ -185,6 +185,7 @@ Yii Framework 2 Change Log ...@@ -185,6 +185,7 @@ Yii Framework 2 Change Log
- Chg #4147: `BaseMailer::compose()` will not overwrite the `message` parameter if it is explicitly provided (qiangxue) - Chg #4147: `BaseMailer::compose()` will not overwrite the `message` parameter if it is explicitly provided (qiangxue)
- Chg #4201: change default value of `SyslogTarget::facility` from LOG_SYSLOG to LOG_USER (dizews) - Chg #4201: change default value of `SyslogTarget::facility` from LOG_SYSLOG to LOG_USER (dizews)
- Chg #4227: `\yii\widgets\LinkPager::$hideOnSinglePage` is now `true` by default (samdark) - Chg #4227: `\yii\widgets\LinkPager::$hideOnSinglePage` is now `true` by default (samdark)
- Chg #4310: Removed `$data` from signature of `yii\rbac\ManagerInterface` (samdark)
- Chg #4318: `yii\helpers\Html::ul()` and `ol()` will return an empty list tag if an empty item array is given (qiangxue) - Chg #4318: `yii\helpers\Html::ul()` and `ol()` will return an empty list tag if an empty item array is given (qiangxue)
- Chg #4331: `yii\helpers\Url` now uses `UrlManager` to determine base URL when generating URLs (qiangxue) - Chg #4331: `yii\helpers\Url` now uses `UrlManager` to determine base URL when generating URLs (qiangxue)
- Chg: Replaced `clearAll()` and `clearAllAssignments()` in `yii\rbac\ManagerInterface` with `removeAll()`, `removeAllRoles()`, `removeAllPermissions()`, `removeAllRules()` and `removeAllAssignments()` (qiangxue) - Chg: Replaced `clearAll()` and `clearAllAssignments()` in `yii\rbac\ManagerInterface` with `removeAll()`, `removeAllRoles()`, `removeAllPermissions()`, `removeAllRules()` and `removeAllAssignments()` (qiangxue)
......
...@@ -595,7 +595,7 @@ class DbManager extends BaseManager ...@@ -595,7 +595,7 @@ class DbManager extends BaseManager
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function assign($role, $userId, $rule = null, $data = null) public function assign($role, $userId, $rule = null)
{ {
$assignment = new Assignment([ $assignment = new Assignment([
'userId' => $userId, 'userId' => $userId,
......
...@@ -167,11 +167,10 @@ interface ManagerInterface ...@@ -167,11 +167,10 @@ interface ManagerInterface
* @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 * @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. * will be executed when [[allow()]] is called to check the user permission.
* @param mixed $data additional data associated with this assignment.
* @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, $data = null); public function assign($role, $userId, $rule = null);
/** /**
* Revokes a role from a user. * Revokes a role from a user.
......
...@@ -223,7 +223,7 @@ class PhpManager extends BaseManager ...@@ -223,7 +223,7 @@ class PhpManager extends BaseManager
/** /**
* @inheritdoc * @inheritdoc
*/ */
public function assign($role, $userId, $ruleName = null, $data = null) public function assign($role, $userId, $ruleName = null)
{ {
if (!isset($this->items[$role->name])) { if (!isset($this->items[$role->name])) {
throw new InvalidParamException("Unknown role '{$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