KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > formview > permission > RolesPermissionsAdapter


1 package net.sourceforge.formview.permission;
2
3 import javax.servlet.http.HttpServletRequest JavaDoc;
4
5 /**
6  * Description :
7  * Created on 1 févr. 2006
8  * @author azerr
9  */

10 public class RolesPermissionsAdapter extends AbstractRolesPermissionsAdapter {
11      
12     /**
13      * The current request for this user
14      */

15     private HttpServletRequest JavaDoc request;
16     
17     /**
18      * Creates a new instance of RolesPermissionsAdapter
19      */

20     public RolesPermissionsAdapter(HttpServletRequest JavaDoc request) {
21         this.request = request;
22     }
23     
24     public boolean hasRole(String JavaDoc role) {
25         return request.isUserInRole(role);
26     }
27     
28 }
29
Popular Tags