Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
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
李丛阳
education
Commits
4288e93d
Commit
4288e93d
authored
May 11, 2018
by
李丛阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
authen
parent
1d7cd3dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
AuthenticationServiceImpl.java
.../rcisoft/core/service/impl/AuthenticationServiceImpl.java
+5
-7
No files found.
src/main/java/org/rcisoft/core/service/impl/AuthenticationServiceImpl.java
View file @
4288e93d
...
...
@@ -100,14 +100,13 @@ public class AuthenticationServiceImpl implements AuthenticationService {
rolePeration
=
sysRoleRepository
.
queryRoleByRoleCode
(
"10"
,
role
.
get
(
0
).
getBusinessId
());
//如果用户请求登录后台,并且但是其并没有任何后台权限,抛出异常
if
(
userType
.
equals
(
"1"
)&&
rolePeration
==
0
)
{
if
(
userType
.
equals
(
"1"
)&&
rolePeration
==
0
)
throw
new
ServiceException
(
ResultServiceEnums
.
ROLE_ERROR
);
}
else
if
(
userType
.
equals
(
"0"
)&&
global
.
getAdminCode
().
equals
(
role
.
get
(
0
).
getCode
())){
//代表请求前台,教师和学生可以请求,管理员不可以
else
if
(
userType
.
equals
(
"0"
)&&
global
.
getAdminCode
().
equals
(
role
.
get
(
0
).
getCode
()))
//代表请求前台,教师和学生可以请求,管理员不可以
throw
new
ServiceException
(
ResultServiceEnums
.
ROLE_ERROR
);
}
}
else
{
}
else
throw
new
ServiceException
(
ResultServiceEnums
.
ROLE_ERROR
);
}
//查询菜单权限
List
<
MenuDto
>
menus
=
sysMenuRepository
.
queryMeunsByRoleId
(
role
.
get
(
0
).
getBusinessId
());
...
...
@@ -116,11 +115,10 @@ public class AuthenticationServiceImpl implements AuthenticationService {
String
agencyCode
=
""
;
//请求登陆运维平台并且拥有登录运维平台权限并且不是Admin的用户,查询他的所属教学单位
if
(
userType
.
equals
(
"1"
)&&
rolePeration
==
1
&&!
global
.
getAdminCode
().
equals
(
role
.
get
(
0
).
getCode
())){
if
(
userType
.
equals
(
"1"
)&&
rolePeration
!=
0
&&!
global
.
getAdminCode
().
equals
(
role
.
get
(
0
).
getCode
())){
//查询教学单位code
agencyCode
=
bCompanyRepository
.
queryAgencyCodeByCode
(
username
);
}
userAuthDTO
.
setUserId
(
sysUser
.
getBusinessId
());
userAuthDTO
.
setName
(
sysUser
.
getName
());
userAuthDTO
.
setHeadPic
(
sysUser
.
getHeadPic
());
...
...
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