@Override public boolean removeRole(GeoServerRole role) throws IOException { if (filterRole(role) != null) { return delegateAsStore().removeRole(role); } return false; }
public boolean removeRole(GeoServerRole role) throws IOException { checkRoleIsMapped(role); checkRoleIsUsed(role); return getStore().removeRole(role); }
public void removeValues(GeoServerRoleStore roleStore) throws IOException { GeoServerRole role_auth = roleStore.createRoleObject("ROLE_AUTHENTICATED"); GeoServerRole role_wfs = roleStore.getRoleByName("ROLE_WFS"); roleStore.removeRole(role_wfs); roleStore.removeRole(role_auth); }
/** * WRITE_LOCK * * @see * org.geoserver.security.GeoServerRoleStore#removeRole(org.geoserver.security.impl.GeoServerRole) */ public boolean removeRole(GeoServerRole role) throws IOException { writeLock(); try { return getStore().removeRole(role); } finally { writeUnLock(); } }
store.removeRole(role); assertTrue(store.isModified()); store.load();
protected void delete(GeoServerRoleService roleService, String roleName) throws IOException { GeoServerRoleStore store = getStore(roleService); try { store.removeRole(getRole(store, roleName)); } finally { store.store(); } }
protected boolean onSubmit(AjaxRequestTarget target, Component contents) { // cascade delete the whole selection GeoServerRoleStore gaStore = null; try { GeoServerRoleService gaService = GeoServerApplication.get().getSecurityManager().loadRoleService(roleServiceName); gaStore = new RoleStoreValidationWrapper(gaService.createStore()); for (GeoServerRole role : removePanel.getRoots()) { gaStore.removeRole(role); } gaStore.store(); } catch (IOException ex) { try {gaStore.load(); } catch (IOException ex2) {}; throw new RuntimeException(ex); } // the deletion will have changed what we see in the page // so better clear out the selection roles.clearSelection(); return true; }
protected boolean onSubmit(AjaxRequestTarget target, Component contents) { // cascade delete the whole selection GeoServerRoleStore gaStore = null; try { GeoServerRoleService gaService = GeoServerApplication.get().getSecurityManager().loadRoleService(roleServiceName); gaStore = new RoleStoreValidationWrapper(gaService.createStore()); for (GeoServerRole role : removePanel.getRoots()) { gaStore.removeRole(role); } gaStore.store(); } catch (IOException ex) { try {gaStore.load(); } catch (IOException ex2) {}; throw new RuntimeException(ex); } // the deletion will have changed what we see in the page // so better clear out the selection roles.clearSelection(); return true; }
protected boolean onSubmit( AjaxRequestTarget target, Component contents) { // cascade delete the whole selection GeoServerRoleStore gaStore = null; try { GeoServerRoleService gaService = GeoServerApplication.get() .getSecurityManager() .loadRoleService(roleServiceName); gaStore = new RoleStoreValidationWrapper(gaService.createStore()); for (GeoServerRole role : removePanel.getRoots()) { gaStore.removeRole(role); } gaStore.store(); } catch (IOException ex) { try { gaStore.load(); } catch (IOException ex2) { } ; throw new RuntimeException(ex); } // the deletion will have changed what we see in the page // so better clear out the selection roles.clearSelection(); return true; }
expect(roleStore.removeRole(new GeoServerRole("unused"))).andReturn(true);
} catch (IOException ex) { try { store2.removeRole(role_test2); } catch (IOException ex1) { try {
roleStore.removeRole(tmp); roles.remove(tmp); checkRoles(username, roles);