Lines Matching defs:request
70 private void init(HttpServletRequest request) {
77 if (!request.isUserInRole(group)) {
81 discoverGroup(group, request, descendants);
84 userGroups.get(request.getUserPrincipal().getName()).addAll(descendants);
87 private void discoverGroup(String group, HttpServletRequest request, Set<String> descendants) {
92 userProjects.get(request.getUserPrincipal().getName()).add(p.getDescription());
95 userProjects.get(request.getUserPrincipal().getName()).add(p.getDescription());
99 userProjects.get(request.getUserPrincipal().getName()).add(p.getDescription());
102 userProjects.get(request.getUserPrincipal().getName()).add(p.getDescription());
115 public boolean isAllowed(HttpServletRequest request, Project project) {
116 if (request.getUserPrincipal() == null) {
120 init(request);
122 return userProjects.get(request.getUserPrincipal().getName()).contains(project.getDescription());
126 public boolean isAllowed(HttpServletRequest request, Group group) {
127 if (request.getUserPrincipal() == null) {
131 init(request);
133 return userGroups.get(request.getUserPrincipal().getName()).contains(group.getName());