If the invitation is accepted then send the user to the accepted DMP if the user click again the link from the email

This commit is contained in:
George Kalampokis 2021-06-17 13:58:28 +03:00
parent 1eb9aadaea
commit 78186fb96d
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ public class InvitationsManager {
eu.eudat.data.entities.Invitation invitation = apiContext.getOperationsContext().getDatabaseRepository().getInvitationDao().find(invitationID); eu.eudat.data.entities.Invitation invitation = apiContext.getOperationsContext().getDatabaseRepository().getInvitationDao().find(invitationID);
if (invitation == null) if (invitation == null)
throw new UnauthorisedException("There is no Data Management Plan assigned to this Link"); throw new UnauthorisedException("There is no Data Management Plan assigned to this Link");
if (invitation.getAcceptedInvitation()) throw new UnauthorisedException("This Url Has Expired"); if (invitation.getAcceptedInvitation()) return invitation.getDmp().getId(); //throw new UnauthorisedException("This Url Has Expired");
JAXBContext context = JAXBContext.newInstance(Properties.class); JAXBContext context = JAXBContext.newInstance(Properties.class);
Unmarshaller unmarshaller = context.createUnmarshaller(); Unmarshaller unmarshaller = context.createUnmarshaller();
Properties properties = (Properties) unmarshaller.unmarshal(new StringReader(invitation.getProperties())); Properties properties = (Properties) unmarshaller.unmarshal(new StringReader(invitation.getProperties()));