Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
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
Narendar Vakiti
mytime
Commits
aafbaa63
Unverified
Commit
aafbaa63
authored
Jul 31, 2018
by
rsayannagari-nisum-com
Committed by
GitHub
Jul 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #91 from nisum-inc/FEATURE/AddedAdminRole
AddedAdminRole
parents
ee05934f
7c040491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
UserController.java
...main/java/com/nisum/mytime/controller/UserController.java
+7
-3
No files found.
src/main/java/com/nisum/mytime/controller/UserController.java
View file @
aafbaa63
...
@@ -44,9 +44,13 @@ public class UserController {
...
@@ -44,9 +44,13 @@ public class UserController {
public
ResponseEntity
<
EmployeeRoles
>
getEmployeeRole
(
@RequestParam
(
"emailId"
)
String
emailId
)
public
ResponseEntity
<
EmployeeRoles
>
getEmployeeRole
(
@RequestParam
(
"emailId"
)
String
emailId
)
throws
MyTimeException
{
throws
MyTimeException
{
EmployeeRoles
employeesRole
=
userService
.
getEmployeesRole
(
emailId
);
EmployeeRoles
employeesRole
=
userService
.
getEmployeesRole
(
emailId
);
String
roleName
=
roleMappingService
.
getEmployeeRole
(
employeesRole
.
getEmployeeId
());
if
(
employeesRole
.
getRole
()
!=
null
&&
employeesRole
.
getRole
().
equalsIgnoreCase
(
"Admin"
))
{
if
(
roleName
!=
null
)
{
employeesRole
.
setRole
(
"Admin"
);
employeesRole
.
setRole
(
roleName
);
}
else
{
String
roleName
=
roleMappingService
.
getEmployeeRole
(
employeesRole
.
getEmployeeId
());
if
(
roleName
!=
null
)
{
employeesRole
.
setRole
(
roleName
);
}
}
}
System
.
out
.
println
(
"emailId"
+
emailId
+
"result"
+
employeesRole
);
System
.
out
.
println
(
"emailId"
+
emailId
+
"result"
+
employeesRole
);
return
new
ResponseEntity
<>(
employeesRole
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
employeesRole
,
HttpStatus
.
OK
);
...
...
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