Removed unused role CREATOR

This commit is contained in:
George Kalampokis 2020-02-18 18:25:41 +02:00
parent 694d7f04b8
commit 95d1da10bb
1 changed files with 2 additions and 2 deletions

View File

@ -623,7 +623,7 @@ public class DataManagementPlanManager {
UserDMP userDMP = new UserDMP();
userDMP.setDmp(dmp);
userDMP.setUser(userInfo);
userDMP.setRole(UserDMP.UserDMPRoles.CREATOR.getValue());
userDMP.setRole(UserDMP.UserDMPRoles.OWNER.getValue());
databaseRepository.getUserDmpDao().createOrUpdate(userDMP);
}
@ -1230,7 +1230,7 @@ public class DataManagementPlanManager {
}
private boolean isUserOwnerOfDmp(DMP dmp, Principal principal) {
return (dmp.getUsers().stream().filter(userDMP -> userDMP.getRole().equals(UserDMP.UserDMPRoles.CREATOR.getValue()) || userDMP.getRole().equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getUser().getId()).equals(principal.getId());
return (dmp.getUsers().stream().filter(userDMP -> userDMP.getRole().equals(UserDMP.UserDMPRoles.OWNER.getValue())).findFirst().get().getUser().getId()).equals(principal.getId());
}
public String createZenodoDoi(UUID id, Principal principal, ConfigLoader configLoader) throws Exception {