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:
parent
1eb9aadaea
commit
78186fb96d
|
@ -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()));
|
||||||
|
|
Loading…
Reference in New Issue