Package org.geoserver.web

Source Code of org.geoserver.web.UnauthorizedPage

/* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.web;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

/**
* Displays a message suggesting the user to login or to elevate his privileges
*/
public class UnauthorizedPage extends GeoServerBasePage {

    public UnauthorizedPage() {
        IModel model = null;
        if(getSession().getAuthentication() == null || !getSession().getAuthentication().isAuthenticated())
            model = new ResourceModel( "UnauthorizedPage.loginRequired" );
        else
            model = new ResourceModel( "UnauthorizedPage.insufficientPrivileges" );
        add(new Label("unauthorizedMessage", model));
    }
}
TOP

Related Classes of org.geoserver.web.UnauthorizedPage

TOP
Copyright © 2018 www.massapi.com. 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.