Skip to content

Commit 1efc521

Browse files
author
Vladimir Kotal
committed
sessionAllowed
1 parent 76c69df commit 1efc521

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

plugins/src/opengrok/auth/plugin/LdapFilterPlugin.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public class LdapFilterPlugin extends AbstractLdapPlugin {
4545

4646
protected static final String FILTER_PARAM = "filter";
4747
private static final String SESSION_ALLOWED_PREFIX = "opengrok-filter-plugin-allowed";
48-
private String SESSION_ALLOWED = SESSION_ALLOWED_PREFIX;
48+
private String sessionAllowed = SESSION_ALLOWED_PREFIX;
4949

5050
private String ldapFilter;
5151

5252
public LdapFilterPlugin() {
53-
SESSION_ALLOWED += "-" + nextId++;
53+
sessionAllowed += "-" + nextId++;
5454
}
5555

5656
@Override
@@ -66,7 +66,7 @@ public void load(Map<String, Object> parameters) {
6666
@Override
6767
protected boolean sessionExists(HttpServletRequest req) {
6868
return super.sessionExists(req)
69-
&& req.getSession().getAttribute(SESSION_ALLOWED) != null;
69+
&& req.getSession().getAttribute(sessionAllowed) != null;
7070
}
7171

7272
@Override
@@ -152,16 +152,16 @@ protected String expandFilter(String filter, LdapUser ldapUser, User user) {
152152
* @param allowed the new value
153153
*/
154154
protected void updateSession(HttpServletRequest req, boolean allowed) {
155-
req.getSession().setAttribute(SESSION_ALLOWED, allowed);
155+
req.getSession().setAttribute(sessionAllowed, allowed);
156156
}
157157

158158
@Override
159159
public boolean checkEntity(HttpServletRequest request, Project project) {
160-
return ((Boolean) request.getSession().getAttribute(SESSION_ALLOWED));
160+
return ((Boolean) request.getSession().getAttribute(sessionAllowed));
161161
}
162162

163163
@Override
164164
public boolean checkEntity(HttpServletRequest request, Group group) {
165-
return ((Boolean) request.getSession().getAttribute(SESSION_ALLOWED));
165+
return ((Boolean) request.getSession().getAttribute(sessionAllowed));
166166
}
167167
}

0 commit comments

Comments
 (0)