Package org.geoserver.security

Examples of org.geoserver.security.GeoserverUserDao


    @Override
    protected void onFormSubmit() {
        try {
            UserUIModel model = (UserUIModel) getModelObject();
            GeoserverUserDao dao = GeoserverUserDao.get();
            dao.setUser(model.toAcegiUser());
            dao.storeUsers();
            setResponsePage(UserPage.class);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
            error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
        }
View Full Code Here


   
//    public static final Property<User> REMOVE = new PropertyPlaceholder<User>("remove");

    @Override
    protected List<User> getItems() {
        GeoserverUserDao users = (GeoserverUserDao) GeoServerApplication.get().getBean("userDetailsService");
        return users.getUsers();
    }
View Full Code Here

   
    @Override
    protected void onFormSubmit() {
        try {
            UserUIModel user = (UserUIModel) NewUserPage.this.getModelObject();
            GeoserverUserDao dao = GeoserverUserDao.get();
            dao.putUser(user.toAcegiUser());
            dao.storeUsers();
            setResponsePage(UserPage.class);
        } catch(Exception e) {
            LOGGER.log(Level.SEVERE, "Error occurred while saving user", e);
            error(new ParamResourceModel("saveError", getPage(), e.getMessage()));
        }
View Full Code Here

                };
            }

            protected boolean onSubmit(AjaxRequestTarget target, Component contents) {
                // cascade delete the whole selection
                GeoserverUserDao dao = GeoserverUserDao.get();
                for (User user : selection) {
                    if(!user.getUsername().equals("admin"))
                        dao.removeUser(user.getUsername());
                }
                try {
                    dao.storeUsers();
                } catch (IOException e) {
                    e.printStackTrace();
                }

                // the deletion will have changed what we see in the page
View Full Code Here

TOP

Related Classes of org.geoserver.security.GeoserverUserDao

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.