view src/main/java/de/intevation/lada/util/auth/DefaultAuthorization.java @ 578:f36a415c7052

Updated authorization interface and its default implemenation.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 23 Mar 2015 17:46:00 +0100
parents 2f42128de67b
children 6c2921100b7f
line wrap: on
line source
package de.intevation.lada.util.auth;

import javax.ejb.Stateless;

import de.intevation.lada.util.annotation.AuthorizationConfig;
import de.intevation.lada.util.rest.RequestMethod;
import de.intevation.lada.util.rest.Response;

@Stateless
@AuthorizationConfig(type=AuthorizationType.NONE)
public class DefaultAuthorization implements Authorization {

    @Override
    public UserInfo getInfo(Object source) {
        return new UserInfo();
    }

    @Override
    public <T> Response filter(Object source, Response data, Class<T> clazz) {
        return data;
    }

    @Override
    public <T> boolean isAuthorized(
        Object source, Object data, RequestMethod method, Class<T> clazz) {
        return true;
    }

    @Override
    public boolean isReadOnly(Integer probeId) {
        return false;
    }
}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)