Skip to content
Snippets Groups Projects
Commit 7376e246 authored by srosse's avatar srosse
Browse files

OO-722: update the browser's url after logged in with rest url

parent 10b72d45
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,8 @@ public class ResumeController extends FormBasicController implements SupportsAft
boolean interception = false;
if(isREST(ureq)) {
//do nothing
String url = getRESTRedirectURL(ureq);
redirect(ureq, url);
} else if(!historyModule.isResumeEnabled()) {
String url = toUrl(getLandingBC(ureq));
redirect(ureq, url);
......@@ -170,6 +171,18 @@ public class ResumeController extends FormBasicController implements SupportsAft
if(usess.getEntry("AuthDispatcher:entryUrl") != null) return true;
return false;
}
private String getRESTRedirectURL(UserRequest ureq) {
UserSession usess = ureq.getUserSession();
String url = (String)usess.getEntry("AuthDispatcher:businessPath");
if(url == null) {
url = (String)usess.getEntry("AuthDispatcher:entryUrl");
}
List<ContextEntry> ces = BusinessControlFactory.getInstance().createCEListFromString(url);
return BusinessControlFactory.getInstance().getAsRestPart(ces, true);
}
@Override
protected void doDispose() {
......
......@@ -250,7 +250,8 @@ public class BaseFullWebappController extends BasicController implements DTabs,
}
if(assessmentGuardCtrl == null && (aftLHookCtr == null || aftLHookCtr.isDisposed())
&& usess.getEntry("AuthDispatcher:entryUrl") == null) {
&& usess.getEntry("AuthDispatcher:entryUrl") == null
&& usess.getEntry("AuthDispatcher:businessPath") == null) {
String bc = initializeDefaultSite(ureq);
if(StringHelper.containsNonWhitespace(bc) && usess.getEntry("redirect-bc") == null) {
usess.putEntry("redirect-bc", bc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment