@Override protected List<GeoServerRole> load() { List<GeoServerRole> tmp = new ArrayList<GeoServerRole>(); List<GeoServerRole> result = new ArrayList<GeoServerRole>(); try { GeoServerUserGroupService ugService = getSecurityManager() .loadUserGroupService(ugServiceName); GeoServerRoleService gaService = getSecurityManager() .getActiveRoleService(); RoleCalculator calc = new RoleCalculator(ugService, gaService); tmp.addAll(rolePalette.getSelectedRoles()); calc.addInheritedRoles(tmp); for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) { if (group.isEnabled()) { tmp.addAll(calc.calculateRoles(group)); } } result.addAll(calc.personalizeRoles(user, tmp)); } catch (IOException e) { throw new RuntimeException(e); } Collections.sort(result); return result; } }
@Override protected List<GeoServerRole> load() { List<GeoServerRole> tmp = new ArrayList<GeoServerRole>(); List<GeoServerRole> result = new ArrayList<GeoServerRole>(); try { GeoServerUserGroupService ugService = getSecurityManager() .loadUserGroupService(ugServiceName); GeoServerRoleService gaService = getSecurityManager() .getActiveRoleService(); RoleCalculator calc = new RoleCalculator(ugService, gaService); tmp.addAll(rolePalette.getSelectedRoles()); calc.addInheritedRoles(tmp); for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) { if (group.isEnabled()) { tmp.addAll(calc.calculateRoles(group)); } } result.addAll(calc.personalizeRoles(user, tmp)); } catch (IOException e) { throw new RuntimeException(e); } Collections.sort(result); return result; } }
@Override protected List<GeoServerRole> load() { List<GeoServerRole> tmp = new ArrayList<GeoServerRole>(); List<GeoServerRole> result = new ArrayList<GeoServerRole>(); try { GeoServerUserGroupService ugService = getSecurityManager().loadUserGroupService(ugServiceName); GeoServerRoleService gaService = getSecurityManager().getActiveRoleService(); RoleCalculator calc = new RoleCalculator(ugService, gaService); tmp.addAll(rolePalette.getSelectedRoles()); calc.addInheritedRoles(tmp); for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) { if (group.isEnabled()) { tmp.addAll(calc.calculateRoles(group)); } } result.addAll(calc.personalizeRoles(user, tmp)); } catch (IOException e) { throw new RuntimeException(e); } Collections.sort(result); return result; } }
getSecurityManager().loadPasswordEncoder(ugService.getPasswordEncoderName()) instanceof GeoServerEmptyPasswordEncoder; boolean hasUserGroupStore = ugService.canCreateStore(); boolean hasRoleStore = hasRoleStore(getSecurityManager().getActiveRoleService().getName()); roles = new ArrayList( getSecurityManager() .getActiveRoleService() .getRolesForUser(user.getUsername())); hasUserGroupStore || hasRoleStore( getSecurityManager().getActiveRoleService().getName()))); form.add(getCancelLink());
boolean emptyPasswd = getSecurityManager().loadPasswordEncoder(ugService.getPasswordEncoderName()) instanceof GeoServerEmptyPasswordEncoder; boolean hasUserGroupStore = ugService.canCreateStore(); boolean hasRoleStore = hasRoleStore(getSecurityManager().getActiveRoleService().getName()); try { roles = new ArrayList( getSecurityManager().getActiveRoleService().getRolesForUser(user.getUsername())); } catch (IOException e) { throw new WicketRuntimeException(e);
boolean emptyPasswd = getSecurityManager().loadPasswordEncoder(ugService.getPasswordEncoderName()) instanceof GeoServerEmptyPasswordEncoder; boolean hasUserGroupStore = ugService.canCreateStore(); boolean hasRoleStore = hasRoleStore(getSecurityManager().getActiveRoleService().getName()); try { roles = new ArrayList( getSecurityManager().getActiveRoleService().getRolesForUser(user.getUsername())); } catch (IOException e) { throw new WicketRuntimeException(e);