Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
ed533172
Commit
ed533172
authored
Jul 25, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted rbac ManagerInterface
parent
0b8c00da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
DbManager.php
framework/rbac/DbManager.php
+1
-1
ManagerInterface.php
framework/rbac/ManagerInterface.php
+1
-3
PhpManager.php
framework/rbac/PhpManager.php
+1
-1
No files found.
framework/rbac/DbManager.php
View file @
ed533172
...
...
@@ -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
,
...
...
framework/rbac/ManagerInterface.php
View file @
ed533172
...
...
@@ -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.
...
...
framework/rbac/PhpManager.php
View file @
ed533172
...
...
@@ -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
}
'."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment