Makes DMP owner to only have the permision to delete members.

This commit is contained in:
gkolokythas 2019-05-29 18:04:20 +03:00
parent 58137d18dd
commit 2f045e6a52
1 changed files with 2 additions and 3 deletions

View File

@ -413,9 +413,8 @@ public class DataManagementPlanManager {
createProjectIfItDoesntExist(newDmp, apiContext.getOperationsContext().getDatabaseRepository().getProjectDao(), user);
newDmp.setCreator(user);
if (user.getId().equals(principal.getId())) {
DMP dmp = apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().find(dataManagementPlan.getId());
DMP dmp = apiContext.getOperationsContext().getDatabaseRepository().getDmpDao().find(dataManagementPlan.getId());
if (dmp.getCreator().getId().equals(principal.getId())) {
List<UserDMP> userDMPList = dmp.getUsers().stream().collect(Collectors.toList());
for (UserInfoListingModel userInfoListingModel : dataManagementPlan.getUsers()) {
for(UserDMP userDMP : userDMPList) {