public void diff(Collection<GeoServerUserGroup> orig, Collection<GeoServerUserGroup> add, Collection<GeoServerUserGroup> remove) { remove.addAll(orig); for (GeoServerUserGroup group : getSelectedGroups()) { if (!orig.contains(group)) { add.add(group); } else { remove.remove(group); } } }
public void diff( Collection<GeoServerUserGroup> orig, Collection<GeoServerUserGroup> add, Collection<GeoServerUserGroup> remove) { remove.addAll(orig); for (GeoServerUserGroup group : getSelectedGroups()) { if (!orig.contains(group)) { add.add(group); } else { remove.remove(group); } } }
public void diff(Collection<GeoServerUserGroup> orig, Collection<GeoServerUserGroup> add, Collection<GeoServerUserGroup> remove) { remove.addAll(orig); for (GeoServerUserGroup group : getSelectedGroups()) { if (!orig.contains(group)) { add.add(group); } else { remove.remove(group); } } }
@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; } }
ugStore.addUser(user); for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) { ugStore.associateUserToGroup(user, group);
ugStore.addUser(user); for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) { ugStore.associateUserToGroup(user, group);
ugStore.addUser(user); for (GeoServerUserGroup group : userGroupPalette.getSelectedGroups()) { ugStore.associateUserToGroup(user, group);