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

OO-2575: better handle error during login with defective business path, fix...

OO-2575: better handle error during login with defective business path, fix NPE in artefact pool v1 if the portfolio v1 is disabled
parent f7534a33
No related branches found
No related tags found
No related merge requests found
...@@ -328,6 +328,13 @@ public class AuthenticatedDispatcher implements Dispatcher { ...@@ -328,6 +328,13 @@ public class AuthenticatedDispatcher implements Dispatcher {
Window w = windowBackOffice.getWindow(); Window w = windowBackOffice.getWindow();
w.dispatchRequest(ureq, true); // renderOnly w.dispatchRequest(ureq, true); // renderOnly
} catch (Exception e) { } catch (Exception e) {
// try to render something
try {
Window w = windowBackOffice.getWindow();
w.dispatchRequest(ureq, true); // renderOnly
} catch (Exception e1) {
redirectToDefaultDispatcher(ureq.getHttpReq(), ureq.getHttpResp());
}
log.error("", e); log.error("", e);
} }
} }
......
...@@ -123,7 +123,7 @@ public class EPArtefactPoolRunController extends BasicController implements Acti ...@@ -123,7 +123,7 @@ public class EPArtefactPoolRunController extends BasicController implements Acti
putInitialPanel(viewComp); putInitialPanel(viewComp);
} else { } else {
putInitialPanel(new Panel("empty")); putInitialPanel(createVelocityContainer("portfolio_disabled"));
} }
} }
...@@ -278,16 +278,18 @@ public class EPArtefactPoolRunController extends BasicController implements Acti ...@@ -278,16 +278,18 @@ public class EPArtefactPoolRunController extends BasicController implements Acti
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) { public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
if(entries == null || entries.isEmpty()) return; if(entries == null || entries.isEmpty()) return;
String type = entries.get(0).getOLATResourceable().getResourceableTypeName(); if(portfolioModule.isEnabled()) {
if("All".equalsIgnoreCase(type)) { String type = entries.get(0).getOLATResourceable().getResourceableTypeName();
initTPAllView(ureq); if("All".equalsIgnoreCase(type)) {
segmentView.select(artefactsLink); initTPAllView(ureq);
} else if("Browse".equalsIgnoreCase(type)) { segmentView.select(artefactsLink);
initTPBrowseView(ureq); } else if("Browse".equalsIgnoreCase(type)) {
segmentView.select(browseLink); initTPBrowseView(ureq);
} else if("Search".equalsIgnoreCase(type)) { segmentView.select(browseLink);
initTPFilterView(ureq); } else if("Search".equalsIgnoreCase(type)) {
segmentView.select(searchLink); initTPFilterView(ureq);
segmentView.select(searchLink);
}
} }
} }
......
<div class="o_warning" role="alert"><i class="o_icon o_icon-fw o_icon_important"> </i> $r.translate("warning.portfolio.module.disabled")</div>
\ No newline at end of file
...@@ -52,6 +52,7 @@ view.mode.table=Tabelle ...@@ -52,6 +52,7 @@ view.mode.table=Tabelle
viewTab.all=Artefakte viewTab.all=Artefakte
viewTab.browse=Tag-Browser viewTab.browse=Tag-Browser
viewTab.search=Suche viewTab.search=Suche
warning.portfolio.module.disabled=ePortfolio v1 ist nicht eingeschaltet.
wizard.intro=Das Artefakt-Sammelwerkzeug enth\u00E4lt verschiedene Schritte in einem Wizard. Einige der Schritte k\u00F6nnen Sie je nach Bedarf aktivieren oder deaktivieren. wizard.intro=Das Artefakt-Sammelwerkzeug enth\u00E4lt verschiedene Schritte in einem Wizard. Einige der Schritte k\u00F6nnen Sie je nach Bedarf aktivieren oder deaktivieren.
wizard.step.copyright=Urheberschaft vom Benutzer best\u00E4tigen lassen wizard.step.copyright=Urheberschaft vom Benutzer best\u00E4tigen lassen
wizard.step.reflexion=Reflexion erfassen wizard.step.reflexion=Reflexion erfassen
......
...@@ -52,6 +52,7 @@ view.mode.table=Table ...@@ -52,6 +52,7 @@ view.mode.table=Table
viewTab.all=Artefacts viewTab.all=Artefacts
viewTab.browse=Tag browser viewTab.browse=Tag browser
viewTab.search=Search viewTab.search=Search
warning.portfolio.module.disabled=ePortfolio v1 is disabled.
wizard.intro=Within the accumulative artefact tool there are several steps to complete. Some of them are optional. You can completely disable those steps if not needed. wizard.intro=Within the accumulative artefact tool there are several steps to complete. Some of them are optional. You can completely disable those steps if not needed.
wizard.step.copyright=Ask user for copyright wizard.step.copyright=Ask user for copyright
wizard.step.reflexion=Collect a reflexion wizard.step.reflexion=Collect a reflexion
......
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