/** * If the security is not enabled, there's no point in having this type * of views. */ @Override public boolean isInstantiable() { return HudsonSecurityEntitiesHolder.getHudsonSecurityManager().isUseSecurity(); }
/** * A convenience method to check if there's some security restrictions in * place. */ @Exported public boolean isUseSecurity() { return getSecurityManager().isUseSecurity(); }
|| !HudsonSecurityEntitiesHolder.getHudsonSecurityManager().isUseSecurity()) {
public static void checkPermission(AbstractProject project, BuildAuthorizationToken token, StaplerRequest req, StaplerResponse rsp) throws IOException { if (!HudsonSecurityEntitiesHolder.getHudsonSecurityManager().isUseSecurity()) { return; // everyone is authorized } if (token != null && token.token != null) { //check the provided token String providedToken = req.getParameter("token"); if (providedToken != null && providedToken.equals(token.token)) { return; } if (providedToken != null) { throw new AccessDeniedException(Messages.BuildAuthorizationToken_InvalidTokenProvided()); } } project.checkPermission(AbstractProject.BUILD); }
if (initSetup.needsInitSetup()) { logger.info("\n\n\n================>\n\nInitial setup required. Please go to the Hudson Dashboard and complete the setup.\n\n<================\n\n\n"); if (HudsonSecurityEntitiesHolder.getHudsonSecurityManager().isUseSecurity() && !securityLoadFailed) { controller.install(new InitialSetupLogin(initSetup)); } else {
if (!isUseSecurity() || v == null || v.equals("random")) { slaveAgentPort = 0; } else if (v.equals("disable")) {