commit | author | age
|
ca8e1e
|
1 |
/* |
U |
2 |
Transit - Remote procedure calls made simple |
|
3 |
Copyright (c) 2012 Ulrich Hilger |
|
4 |
|
|
5 |
This program is free software: you can redistribute it and/or modify |
|
6 |
it under the terms of the GNU Affero General Public License as published by |
|
7 |
the Free Software Foundation, either version 3 of the License, or |
|
8 |
(at your option) any later version. |
|
9 |
|
|
10 |
This program is distributed in the hope that it will be useful, |
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
GNU Affero General Public License for more details. |
|
14 |
|
|
15 |
You should have received a copy of the GNU Affero General Public License |
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 |
*/ |
|
18 |
|
|
19 |
package de.uhilger.transit.web; |
|
20 |
|
|
21 |
|
|
22 |
import javax.servlet.ServletRequest; |
|
23 |
import javax.servlet.ServletResponse; |
|
24 |
|
|
25 |
/** |
|
26 |
* Klassen die eine Berechtigungspruefung ausfuehren |
|
27 |
* muessen die Schnittstelle RechtePruefer implementieren. |
|
28 |
* |
|
29 |
* @author Copyright (c) Ulrich Hilger, http://uhilger.de |
|
30 |
* @author Published under the terms and conditions of |
|
31 |
* the <a href="http://www.gnu.org/licenses/agpl-3.0" target="_blank">GNU Affero General Public License</a> |
|
32 |
* |
|
33 |
* @version 1, September 16, 2012 |
|
34 |
**/ |
|
35 |
|
|
36 |
public interface RechtePruefer { |
|
37 |
|
|
38 |
/** |
|
39 |
* Pruefen ob ein Methodenaufruf erlaubt ist |
|
40 |
* |
|
41 |
* @param request die Anfrage, fuer die die Berechtigung geprueft werden soll |
|
42 |
* @param response die Antwort, fuer die die Berechtigung geprueft werden soll |
|
43 |
* @param klasse vollstaendiger Name der Klasse, die die auszufuehrende Methode enthaelt |
|
44 |
* @param methode Name der Methode, die ausgefuehrt werden soll |
|
45 |
* @param benutzerName Name des Benutzerkontos, dessen Benutzer die Methode ausfuehren moechte |
|
46 |
* |
|
47 |
* @return true, wenn der Benutzer die Methode ausfuehren darf, false wenn nicht |
|
48 |
*/ |
|
49 |
public boolean istErlaubt(ServletRequest request, ServletResponse response, String klasse, String methode, String benutzerName); |
|
50 |
} |