Mercurial > lada > lada-server
view src/main/java/de/intevation/lada/util/auth/Authorization.java @ 800:8c336f08e76f
Addedd method to authorize a messung using the id and the status.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 19 Nov 2015 16:52:30 +0100 |
parents | 3ec358698b4d |
children | fa922101a462 |
line wrap: on
line source
/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz * Software engineering by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=3) * and comes with ABSOLUTELY NO WARRANTY! Check out * the documentation coming with IMIS-Labordaten-Application for details. */ package de.intevation.lada.util.auth; import de.intevation.lada.util.rest.RequestMethod; import de.intevation.lada.util.rest.Response; /** * Interface for authorization in the lada application. * * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> */ public interface Authorization { public UserInfo getInfo(Object source); public <T> Response filter(Object source, Response data, Class<T> clazz); public <T> boolean isAuthorized( Object source, Object data, RequestMethod method, Class<T> clazz); public <T> boolean isAuthorized(int id, Class<T> clazz); public boolean isAuthorized(UserInfo userInfo, Object data); boolean isReadOnly(Integer probeId); }