Package ch.entwine.weblounge.common.security

Examples of ch.entwine.weblounge.common.security.SystemDirectory.loadUser()


                  if (userDirectoryRef != null) {
                    SystemDirectory systemDirectory = (SystemDirectory) bundleContext.getService(userDirectoryRef);
                    User siteAdmin = site.getAdministrator();
                    if (siteAdmin != null) {
                      logger.debug("Checking site '{}' admin user '{}' for shadowing of system account");
                      User shadowedUser = systemDirectory.loadUser(siteAdmin.getLogin(), site);
                      if (shadowedUser != null && SecurityUtils.userHasRole(shadowedUser, SystemRole.SYSTEMADMIN)) {
                        throw new IllegalStateException("Site '" + site.getIdentifier() + "' administrative account '" + siteAdmin.getLogin() + "' is shadowing the system account");
                      }
                    }
                  } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.