Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
Project
Project
Details
Activity
Releases
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
newshop
newShopBack
Commits
0c1e47d8
Commit
0c1e47d8
authored
Dec 18, 2019
by
孙磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限角色权限分配调整
Signed-off-by:
sunlei
<
sunlei@romens.cn
>
parent
50d3f499
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
urlmanager.php
backend/config/urlmanager.php
+2
-0
AuthorityNodeController.php
backend/controllers/v1/authority/AuthorityNodeController.php
+1
-4
ShopRbacNode.php
backend/models/v1/rbacuser/ShopRbacNode.php
+1
-0
ShopTransportType.php
backend/models/v1/transport/ShopTransportType.php
+7
-7
No files found.
backend/config/urlmanager.php
View file @
0c1e47d8
...
...
@@ -333,6 +333,8 @@ return [
],
'extraPatterns'
=>
[
'POST,OPTIONS shop-goods-import'
=>
'shop-goods-import'
,
'POST,OPTIONS goods-extensions-import'
=>
'goods-extensions-import'
,
'POST,OPTIONS points-goods-import'
=>
'points-goods-import'
,
]
],
//商品详情页模板
...
...
backend/controllers/v1/authority/AuthorityNodeController.php
View file @
0c1e47d8
...
...
@@ -9,7 +9,6 @@ use yii\web\BadRequestHttpException;
use
yii\web\HttpException
;
use
yii\web\ServerErrorHttpException
;
use
app\models\v1\rbacuser\ShopRbacRoleAccess
;
use
app\models\v1\rbacuser\ShopRbacNode
;
use
app\models\v1\rbacuser\ShopRbacRole
;
class
AuthorityNodeController
extends
BaseController
...
...
@@ -317,7 +316,7 @@ class AuthorityNodeController extends BaseController
{
//获取登陆用户的权限信息
$rbac
=
new
ShopRbacUser
();
$nodeModel
=
new
ShopRbacNode
();
$nodeModel
=
new
$this
->
modelClass
();
$model
=
new
ShopRbacRole
();
$roleAcessModel
=
new
ShopRbacRoleAccess
();
//获取登陆用户节点信息
...
...
@@ -335,8 +334,6 @@ class AuthorityNodeController extends BaseController
}
if
(
$cur_role_nodes
)
{
$cur_role_authorities
=
$nodeModel
->
getRoleAuthrities
(
$cur_role_nodes
);
//调整节点关系
$cur_role_authorities
=
$this
->
getTree
(
$cur_role_authorities
);
}
else
{
$cur_role_authorities
=
''
;
}
...
...
backend/models/v1/rbacuser/ShopRbacNode.php
View file @
0c1e47d8
...
...
@@ -79,6 +79,7 @@ class ShopRbacNode extends BaseModel
->
select
(
'ID,NAME,TITLE,STATUS,PID'
)
->
where
([
'ifnull(STATUS,0)'
=>
1
])
->
andFilterWhere
([
'ID'
=>
$auth_arr
])
->
orderBy
(
"SORT ASC"
)
->
asArray
()
->
all
();
}
...
...
backend/models/v1/transport/ShopTransportType.php
View file @
0c1e47d8
...
...
@@ -72,12 +72,12 @@ class ShopTransportType extends BaseModel
];
}
//门店-配送方式信息
public
function
BranchTransportInfo
()
public
function
BranchTransportInfo
(
$name
=
''
)
{
$query
=
static
::
find
()
->
select
(
'GUID,NAME'
)
->
where
([
'STATE'
=>
1
]
)
->
all
();
return
$query
;
return
$query
=
static
::
find
(
)
->
select
(
'GUID,NAME'
)
->
where
([
'STATE'
=>
1
])
->
andFilterWhere
([
'NAME'
=>
$name
])
->
all
()
;
}
}
\ No newline at end of file
}
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