Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
sunbird-lms-service
Commits
1d921ab1
Unverified
Commit
1d921ab1
authored
3 years ago
by
Hari-stackroute
Committed by
GitHub
3 years ago
Browse files
Options
Download
Patches
Plain Diff
Assign v1 failing to add existing role when sent for update (#887)
parent
e8e39a33
release-4.1.0
release-4.1.0_RC16
release-4.1.0_RC15
release-4.1.0_RC14
release-4.1.0_RC13
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
actors/sunbird-lms-mw/actors/user/src/main/java/org/sunbird/user/service/impl/UserRoleServiceImpl.java
+4
-1
...va/org/sunbird/user/service/impl/UserRoleServiceImpl.java
with
4 additions
and
1 deletion
+4
-1
actors/sunbird-lms-mw/actors/user/src/main/java/org/sunbird/user/service/impl/UserRoleServiceImpl.java
+
4
−
1
View file @
1d921ab1
...
...
@@ -10,6 +10,7 @@ import java.util.Map;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.SerializationUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.sunbird.exception.ProjectCommonException
;
import
org.sunbird.exception.ResponseCode
;
...
...
@@ -47,8 +48,10 @@ public class UserRoleServiceImpl implements UserRoleService {
userRequest
,
dbUserRoleListToUpdate
,
dbUserRoleListToDelete
,
context
);
// Update existing role scope, if same role is in request
if
(
CollectionUtils
.
isNotEmpty
(
dbUserRoleListToUpdate
))
{
List
<
Map
<
String
,
Object
>>
newUserReqMap
=
SerializationUtils
.
clone
(
new
ArrayList
<>(
dbUserRoleListToUpdate
));
userRoleListResponse
.
addAll
(
newUserReqMap
);
userRoleDao
.
updateRoleScope
(
dbUserRoleListToUpdate
,
context
);
userRoleListResponse
.
addAll
(
dbUserRoleListToUpdate
);
}
// Delete existing roles of user, if the same is not in request
if
(
CollectionUtils
.
isNotEmpty
(
dbUserRoleListToDelete
))
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets