Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
3bb9aedf
Commit
3bb9aedf
authored
Dec 04, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_sherlock' into 'dev_oracle'
role permission See merge request root/atms!221
parents
72f615d8
c32e9474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
role-manage.ctrl.js
...infrastructure/roleManage/controllers/role-manage.ctrl.js
+16
-4
No files found.
atms-web/src/main/webapp/app/admin/infrastructure/roleManage/controllers/role-manage.ctrl.js
View file @
3bb9aedf
infrastructureModule
.
controller
(
'RoleManageController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'roleService'
,
'risDialog'
,
'permissionService'
,
'$state'
,
'$q'
,
'$timeout'
,
.
controller
(
'RoleManageController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'
loginContext'
,
'
roleService'
,
'risDialog'
,
'permissionService'
,
'$state'
,
'$q'
,
'$timeout'
,
'menuService'
,
'uiGridConstants'
,
'SweetAlert'
,
'userService'
,
function
(
$scope
,
$log
,
$translate
,
roleService
,
risDialog
,
permissionService
,
$state
,
$q
,
$timeout
,
menuService
,
function
(
$scope
,
$log
,
$translate
,
loginContext
,
roleService
,
risDialog
,
permissionService
,
$state
,
$q
,
$timeout
,
menuService
,
uiGridConstants
,
SweetAlert
,
userService
)
{
'use strict'
;
...
...
@@ -748,15 +748,27 @@
/*-------------------------------------------------------org list function start-------------------------------------------------*/
//init org list
var
initRoleList
=
function
()
{
var
isSuperAdmin
;
userService
.
getUserPermissionNew
(
loginContext
.
userName
,
function
(
data
)
{
isSuperAdmin
=
data
.
isSuperAdmin
;
});
$scope
.
isSelected
=
false
;
roleService
.
getRoleListByServiceGroup
().
success
(
function
(
roleData
)
{
if
(
!
isSuperAdmin
){
roleData
[
0
].
subRoles
=
[
roleData
[
0
].
subRoles
[
0
]];
}
console
.
log
(
'roleData:'
,
roleData
);
$scope
.
roleList
=
roleData
;
if
(
roleData
[
0
].
subRoles
!=
null
&&
roleData
[
0
].
subRoles
!==
undefined
&&
roleData
[
0
].
subRoles
[
0
])
{
permissionService
.
getAllPermissions
(
$scope
.
serviceType
).
success
(
function
(
data
)
{
$scope
.
allRawPermissionTreeViewData
=
data
;
$scope
.
allPermissionTreeViewData
=
data
;
if
(
!
isSuperAdmin
){
data
[
0
].
items
[
0
].
items
.
splice
(
3
,
1
);
data
[
0
].
items
[
0
].
items
[
2
].
items
.
splice
(
1
,
2
);
$scope
.
allPermissionTreeViewData
=
data
;
}
else
{
$scope
.
allPermissionTreeViewData
=
data
;
}
selectRole
(
roleData
[
0
].
subRoles
[
0
]);
});
}
...
...
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