/** * Generate the default geoserver administrator user. The administrator will be added directly * to the in-memory storage of the user details, rather than returned by this method. */ private void createDefaultUser() { String name = (geoServer == null ? "admin" : geoServer.getGlobal().getAdminUsername()); String passwd = (geoServer == null ? "geoserver" : geoServer.getGlobal().getAdminPassword()); Collection<GrantedAuthority> auths = new ArrayList<GrantedAuthority>(); auths.add(new SimpleGrantedAuthority("ROLE_ADMINISTRATOR")); myDetailStorage.put(name, new User(name, passwd, true, true, true, true, auths)); }
GeoServerInfo global = GeoServerExtensions.bean(GeoServer.class).getGlobal(); if ((global != null) && (global.getAdminUsername() != null) && !global.getAdminUsername().trim().equals("")) { p.put( global.getAdminUsername(), global.getAdminPassword() + ",ROLE_ADMINISTRATOR"); } else {
} else if (!adminPassword.equals(other.getAdminPassword())) return false; if (adminUsername == null) { if (other.getAdminUsername() != null) return false; } else if (!adminUsername.equals(other.getAdminUsername())) return false; if (settings == null) { if (other.getSettings() != null) return false;