Search in sources :

Example 1 with UserAdminContextEntryControllerCreator

use of org.olat.admin.user.UserAdminContextEntryControllerCreator in project OpenOLAT by OpenOLAT.

the class UserModule method init.

@Override
public void init() {
    int count = 0;
    for (String regexp : loginBlacklist) {
        try {
            Pattern.compile(regexp);
            loginBlacklistChecked.add(regexp);
        } catch (PatternSyntaxException pse) {
            log.error("Invalid pattern syntax in blacklist. Pattern: " + regexp + ". Removing from this entry from list ");
        }
        count++;
    }
    log.info("Successfully added " + count + " entries to login blacklist.");
    String userEmailOptionalValue = getStringPropertyValue(USER_EMAIL_MANDATORY, false);
    if (StringHelper.containsNonWhitespace(userEmailOptionalValue)) {
        isEmailMandatory = "true".equalsIgnoreCase(userEmailOptionalValue);
    }
    String userEmailUniquenessOptionalValue = getStringPropertyValue(USER_EMAIL_UNIQUE, false);
    if (StringHelper.containsNonWhitespace(userEmailUniquenessOptionalValue)) {
        isEmailUnique = "true".equalsIgnoreCase(userEmailUniquenessOptionalValue);
    }
    // Check if user manager is configured properly and has user property
    // handlers for the mandatory user properties used in OLAT
    checkMandatoryUserProperty(UserConstants.FIRSTNAME);
    checkMandatoryUserProperty(UserConstants.LASTNAME);
    if (isEmailMandatory()) {
        checkMandatoryUserProperty(UserConstants.EMAIL);
    }
    // Add controller factory extension point to launch user profile controller
    NewControllerFactory.getInstance().addContextEntryControllerCreator(Identity.class.getSimpleName(), new IdentityContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator("HomeSite", new IdentityContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator("HomePage", new HomePageContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator(User.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator(UserAdminSite.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
}
Also used : User(org.olat.core.id.User) UserAdminContextEntryControllerCreator(org.olat.admin.user.UserAdminContextEntryControllerCreator) UserAdminSite(org.olat.admin.site.UserAdminSite) Identity(org.olat.core.id.Identity) PatternSyntaxException(java.util.regex.PatternSyntaxException)

Example 2 with UserAdminContextEntryControllerCreator

use of org.olat.admin.user.UserAdminContextEntryControllerCreator in project openolat by klemens.

the class BaseSecurityModule method init.

@Override
public void init() {
    NewControllerFactory.getInstance().addContextEntryControllerCreator(User.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
    updateProperties();
}
Also used : User(org.olat.core.id.User) UserAdminContextEntryControllerCreator(org.olat.admin.user.UserAdminContextEntryControllerCreator)

Example 3 with UserAdminContextEntryControllerCreator

use of org.olat.admin.user.UserAdminContextEntryControllerCreator in project OpenOLAT by OpenOLAT.

the class AdminModule method init.

@Override
public void init() {
    initializeSystemTokenProperty(PROPERTY_MAINTENANCE_MESSAGE);
    initializeSystemTokenProperty(PROPERTY_SESSION_ADMINISTRATION);
    boolean loginBlocked = getBooleanPropertyValue(CONFIG_LOGIN_BLOCKED);
    if (loginBlocked) {
        AuthHelper.setLoginBlocked(loginBlocked);
    }
    // Add controller factory extension point to launch groups
    NewControllerFactory.getInstance().addContextEntryControllerCreator(User.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator("NewIdentityCreated", new UserAdminContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator(AdminSite.class.getSimpleName(), new SiteContextEntryControllerCreator(AdminSite.class));
}
Also used : User(org.olat.core.id.User) UserAdminContextEntryControllerCreator(org.olat.admin.user.UserAdminContextEntryControllerCreator) AdminSite(org.olat.admin.site.AdminSite) SiteContextEntryControllerCreator(org.olat.core.id.context.SiteContextEntryControllerCreator)

Example 4 with UserAdminContextEntryControllerCreator

use of org.olat.admin.user.UserAdminContextEntryControllerCreator in project OpenOLAT by OpenOLAT.

the class BaseSecurityModule method init.

@Override
public void init() {
    NewControllerFactory.getInstance().addContextEntryControllerCreator(User.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
    updateProperties();
}
Also used : User(org.olat.core.id.User) UserAdminContextEntryControllerCreator(org.olat.admin.user.UserAdminContextEntryControllerCreator)

Example 5 with UserAdminContextEntryControllerCreator

use of org.olat.admin.user.UserAdminContextEntryControllerCreator in project openolat by klemens.

the class UserModule method init.

@Override
public void init() {
    int count = 0;
    for (String regexp : loginBlacklist) {
        try {
            Pattern.compile(regexp);
            loginBlacklistChecked.add(regexp);
        } catch (PatternSyntaxException pse) {
            log.error("Invalid pattern syntax in blacklist. Pattern: " + regexp + ". Removing from this entry from list ");
        }
        count++;
    }
    log.info("Successfully added " + count + " entries to login blacklist.");
    String userEmailOptionalValue = getStringPropertyValue(USER_EMAIL_MANDATORY, false);
    if (StringHelper.containsNonWhitespace(userEmailOptionalValue)) {
        isEmailMandatory = "true".equalsIgnoreCase(userEmailOptionalValue);
    }
    String userEmailUniquenessOptionalValue = getStringPropertyValue(USER_EMAIL_UNIQUE, false);
    if (StringHelper.containsNonWhitespace(userEmailUniquenessOptionalValue)) {
        isEmailUnique = "true".equalsIgnoreCase(userEmailUniquenessOptionalValue);
    }
    // Check if user manager is configured properly and has user property
    // handlers for the mandatory user properties used in OLAT
    checkMandatoryUserProperty(UserConstants.FIRSTNAME);
    checkMandatoryUserProperty(UserConstants.LASTNAME);
    if (isEmailMandatory()) {
        checkMandatoryUserProperty(UserConstants.EMAIL);
    }
    // Add controller factory extension point to launch user profile controller
    NewControllerFactory.getInstance().addContextEntryControllerCreator(Identity.class.getSimpleName(), new IdentityContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator("HomeSite", new IdentityContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator("HomePage", new HomePageContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator(User.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
    NewControllerFactory.getInstance().addContextEntryControllerCreator(UserAdminSite.class.getSimpleName(), new UserAdminContextEntryControllerCreator());
}
Also used : User(org.olat.core.id.User) UserAdminContextEntryControllerCreator(org.olat.admin.user.UserAdminContextEntryControllerCreator) UserAdminSite(org.olat.admin.site.UserAdminSite) Identity(org.olat.core.id.Identity) PatternSyntaxException(java.util.regex.PatternSyntaxException)

Aggregations

UserAdminContextEntryControllerCreator (org.olat.admin.user.UserAdminContextEntryControllerCreator)6 User (org.olat.core.id.User)6 PatternSyntaxException (java.util.regex.PatternSyntaxException)2 AdminSite (org.olat.admin.site.AdminSite)2 UserAdminSite (org.olat.admin.site.UserAdminSite)2 Identity (org.olat.core.id.Identity)2 SiteContextEntryControllerCreator (org.olat.core.id.context.SiteContextEntryControllerCreator)2