Package org.geoserver.security.validation

Examples of org.geoserver.security.validation.RoleStoreValidationWrapper


        GeoServerRoleStore gaStore = null;
        try {
            if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) {
                gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName());
                gaStore = new RoleStoreValidationWrapper(gaStore);

                Set<GeoServerRole> orig = gaStore.getRolesForGroup(group.getGroupname());
                Set<GeoServerRole> add = new HashSet<GeoServerRole>();
                Set<GeoServerRole> remove = new HashSet<GeoServerRole>();
                rolePalette.diff(orig, add, remove);
View Full Code Here


               
                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) {
View Full Code Here

        GeoServerRoleStore gaStore=null;
        try {
            if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) {
                gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName());
                gaStore = new RoleStoreValidationWrapper(gaStore);

                for (GeoServerRole role : rolePalette.getSelectedRoles()) {
                    gaStore.associateRoleToGroup(role, group.getGroupname());
                }
                gaStore.store();
View Full Code Here

                GeoServerRoleStore gaStore = null;
                if (disassociateRoles) {
                    try {
                        gaStore =
                                GeoServerApplication.get().getSecurityManager().getActiveRoleService().createStore();
                        gaStore = new RoleStoreValidationWrapper(gaStore);
                        for (GeoServerUserGroup group : removePanel.getRoots()) {                                             
                                 List<GeoServerRole> list= new ArrayList<GeoServerRole>();
                                 list.addAll(gaStore.getRolesForGroup(group.getGroupname()));
                                 for (GeoServerRole role: list)
                                     gaStore.disAssociateRoleFromGroup(role, group.getGroupname());
View Full Code Here

        GeoServerRoleStore roleStore=null;
        try {
            if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) {
                roleStore = getRoleStore(getSecurityManager().getActiveRoleService().getName());
                roleStore = new RoleStoreValidationWrapper(roleStore);
               
                Set<GeoServerRole> orig = roleStore.getRolesForUser(user.getUsername());
                Set<GeoServerRole> add = new HashSet<GeoServerRole>();
                Set<GeoServerRole> remove = new HashSet<GeoServerRole>();
                rolePalette.diff(orig, add, remove);
View Full Code Here

    protected void onFormSubmit(GeoServerRole role) throws IOException {
       
        GeoServerRoleStore store = null;
        try {

            store = new RoleStoreValidationWrapper(getRoleStore(roleServiceName));
            //copy into a new one so we can set the name properly
            GeoServerRole newRole= store.createRoleObject(get("form:name").getDefaultModelObjectAsString());
            newRole.setUserName(role.getUserName());
            newRole.getProperties().putAll(role.getProperties());
            role = newRole;                       
View Full Code Here

                if (disassociateRoles) {
                    try {
                        gaStore =
                                GeoServerApplication.get().getSecurityManager()
                                    .getActiveRoleService().createStore();
                        gaStore=new RoleStoreValidationWrapper(gaStore);
   
                        for (GeoServerUser user : removePanel.getRoots()) {                                                                        
                                List<GeoServerRole> list= new ArrayList<GeoServerRole>();
                                list.addAll(gaStore.getRolesForUser(user.getUsername()));
                                for (GeoServerRole role: list)
View Full Code Here

            throw new RuntimeException("Invalid workflow, cannot store in a read only role service");
        }

        GeoServerRoleStore store=null;
        try {
            store = new RoleStoreValidationWrapper(getRoleStore(roleServiceName));

            GeoServerRole role = store.getRoleByName(updated.getAuthority());

            role.getProperties().clear();
            role.getProperties().putAll(updated.getProperties());
View Full Code Here

        GeoServerRoleStore gaStore = null;
        try {
            if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) {
                gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName());
                gaStore = new RoleStoreValidationWrapper(gaStore);
                for (GeoServerRole role : rolePalette.getSelectedRoles()) {
                    gaStore.associateRoleToUser(role, user.getUsername());
                }
                gaStore.store();
            }
View Full Code Here

TOP

Related Classes of org.geoserver.security.validation.RoleStoreValidationWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.