Skip to content

Commit

Permalink
NXP-10073: Force logout after validation to recompute rights
Browse files Browse the repository at this point in the history
  • Loading branch information
akervern committed Jan 7, 2013
1 parent afeea49 commit 42564df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
@@ -1,5 +1,6 @@
package org.nuxeo.ecm.user.registration.webengine;

import static org.nuxeo.ecm.platform.ui.web.auth.NXAuthConstants.START_PAGE_SAVE_KEY;
import static org.nuxeo.ecm.user.registration.UserRegistrationService.REGISTRATION_DATA_DOC;

import java.io.Serializable;
Expand Down Expand Up @@ -63,7 +64,9 @@ public Object validateTrialForm(@PathParam("requestId")
return getView("ValidationErrorTemplate").arg("error", e);
}

return redirect(redirectUrl);
getContext().getRequest().getSession().setAttribute(
START_PAGE_SAVE_KEY, redirectUrl);
return redirect("/" + BaseURL.getWebAppName() + "/logout");
}

protected Map<String, Serializable> buildAdditionalInfos() {
Expand Down
Expand Up @@ -6,6 +6,7 @@ You have been invited to access ${registrationDoc.docinfo.documentTitle}.
<br />

<p>Click on the following link to validate your invitation:</p>
<p>After clicking on validate link, you'll be logged out and prompted to log you again.</p>
<br/>
<a href="${info['validationBaseURL']}${registrationDoc.id}">Validate my invitation</a>

Expand Down

0 comments on commit 42564df

Please sign in to comment.