use of org.olat.core.gui.control.ChiefController in project OpenOLAT by OpenOLAT.
the class UserInterestsElement method doEdit.
private void doEdit(UserRequest ureq) {
ChiefController chief = Windows.getWindows(ureq).getChiefController();
WindowControl wControl = chief.getWindowControl();
if (wControl != null) {
List<UserInterestsCategory> availableUserInterests = UserInterestsPropertyHandler.loadAvailableUserInterests();
userInterestsController = new UserInterestsController(ureq, wControl, getSelectedInterestsIDs(), availableUserInterests);
userInterestsController.addControllerListener(this);
String title = getTranslator().translate("userinterests.title");
modalController = new CloseableModalController(wControl, "close", userInterestsController.getInitialComponent(), true, title);
modalController.activate();
}
}
use of org.olat.core.gui.control.ChiefController in project OpenOLAT by OpenOLAT.
the class OAuthDispatcher method error.
private void error(UserRequest ureq, String message) {
StringBuilder sb = new StringBuilder();
sb.append("<h4><i class='o_icon o_icon-fw o_icon_error'> </i>");
sb.append(translate(ureq, "error.title"));
sb.append("</h4><p>");
sb.append(message);
sb.append("</p>");
ChiefController msgcc = new MessageWindowController(ureq, sb.toString());
msgcc.getWindow().dispatchRequest(ureq, true);
}
use of org.olat.core.gui.control.ChiefController in project OpenOLAT by OpenOLAT.
the class DMZContentControllerCreator method createController.
@Override
public Controller createController(UserRequest ureq, WindowControl lwControl) {
DmzBFWCParts dmzSitesAndNav = new DmzBFWCParts();
AutoCreator contentControllerCreator = new AutoCreator();
contentControllerCreator.setClassName(LoginAuthprovidersController.class.getName());
dmzSitesAndNav.setContentControllerCreator(contentControllerCreator);
ChiefController cc = new BaseFullWebappController(ureq, dmzSitesAndNav);
cc.addBodyCssClass("o_dmz");
Windows.getWindows(ureq.getUserSession()).setChiefController(cc);
return cc;
}
use of org.olat.core.gui.control.ChiefController in project openolat by klemens.
the class UserInterestsElement method doEdit.
private void doEdit(UserRequest ureq) {
ChiefController chief = Windows.getWindows(ureq).getChiefController();
WindowControl wControl = chief.getWindowControl();
if (wControl != null) {
List<UserInterestsCategory> availableUserInterests = UserInterestsPropertyHandler.loadAvailableUserInterests();
userInterestsController = new UserInterestsController(ureq, wControl, getSelectedInterestsIDs(), availableUserInterests);
userInterestsController.addControllerListener(this);
String title = getTranslator().translate("userinterests.title");
modalController = new CloseableModalController(wControl, "close", userInterestsController.getInitialComponent(), true, title);
modalController.activate();
}
}
use of org.olat.core.gui.control.ChiefController in project openolat by klemens.
the class ShibbolethDispatcher method authorization.
private boolean authorization(HttpServletRequest req, HttpServletResponse resp, ShibbolethAttributes shibbolethAttibutes) {
boolean authorized = false;
if (shibbolethModule.isAccessControlByAttributes()) {
if (StringHelper.containsNonWhitespace(shibbolethModule.getAttribute1()) && StringHelper.containsNonWhitespace(shibbolethModule.getAttribute1Values())) {
authorized |= authorization(shibbolethModule.getAttribute1(), shibbolethModule.getAttribute1Values(), shibbolethAttibutes);
}
if (StringHelper.containsNonWhitespace(shibbolethModule.getAttribute2()) && StringHelper.containsNonWhitespace(shibbolethModule.getAttribute2Values())) {
authorized |= authorization(shibbolethModule.getAttribute2(), shibbolethModule.getAttribute2Values(), shibbolethAttibutes);
}
} else {
authorized = true;
}
if (!authorized) {
UserRequest ureq = new UserRequestImpl(ShibbolethDispatcher.PATH_SHIBBOLETH, req, resp);
String userMsg = translator.translate("error.shibboleth.not.authorized");
ChiefController msgcc = MessageWindowController.createMessageChiefController(ureq, null, userMsg, null);
msgcc.getWindow().dispatchRequest(ureq, true);
}
return authorized;
}
Aggregations