public class Rights extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PERMISSIONS |
| Constructor and Description |
|---|
Rights() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(javax.servlet.http.HttpServletRequest request)
Initialize Rights
|
boolean |
isAuthorized(String resourceType,
String permission,
String idResource)
Return true if the user has the given permission
|
boolean |
isAuthorizedJspDirectory(String jsp,
String idResource)
Return true if the user has the right to get into the given jsp
(directory)
Uses the mapping jsp -> permission
|
boolean |
isAuthorizedJspForm(String jsp,
String idResource)
Return true if the user has the right to get into the given jsp (form)
Uses the mapping jsp -> permission
|
public static final String PERMISSIONS
public void init(javax.servlet.http.HttpServletRequest request)
request - httppublic boolean isAuthorized(String resourceType, String permission, String idResource)
resourceType - type of resource (use case)permission - key of the permissionidResource - the id of the resourcepublic boolean isAuthorizedJspForm(String jsp, String idResource)
jsp - the jsp urlidResource - the id of the resourcepublic boolean isAuthorizedJspDirectory(String jsp, String idResource)
jsp - the jsp urlidResource - the id resourceCopyright © 2017 City of Paris. All rights reserved.