-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
…less, return false for them always
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,4 +218,13 @@ public int getImplVersion() { | |
public void setImplVersion(int implVersion) { | ||
this.implVersion = implVersion; | ||
} | ||
|
||
/** | ||
* | ||
* @return For GroupPrivileges with IMPL_VERSION == 1 return FALSE, otherwise return actual db isVoided value . | ||
*/ | ||
@Override | ||
public boolean isVoided() { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
himeshr
Author
Contributor
|
||
return getImplVersion() == GroupPrivilege.IMPL_VERSION ? false : super.isVoided(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,7 @@ public void savePrivileges(GroupPrivilegeContractWeb[] requests, Organisation or | |
List<ChecklistDetail> checklistDetails = checklistDetailRepository.findAll(); | ||
List<Group> groups = groupRepository.findAll(); | ||
|
||
Arrays.stream(requests).forEach(request -> { | ||
Arrays.stream(requests).filter(grpPrivyConWebRequest -> !grpPrivyConWebRequest.isVoided()).forEach(request -> { | ||
This comment has been minimized.
Sorry, something went wrong.
mahalakshme
Contributor
|
||
GroupPrivilege groupPrivilege = groupPrivileges.stream().filter(gp -> | ||
Objects.equals(request.getGroupUUID(), gp.getGroupUuid()) | ||
&& Objects.equals(request.getPrivilegeUUID(), gp.getPrivilegeUuid()) | ||
|
@himeshr Here as well, I don't think we should change the behaviour. It should be whatever is in the db. The more are the ifs and buts, later when we need to support voided it will become confusing. Did something break without this?