@@ -45,14 +45,14 @@ public class LdapAttrPlugin extends AbstractLdapPlugin {
45
45
protected static final String ATTR_PARAM = "attribute" ;
46
46
protected static final String FILE_PARAM = "file" ;
47
47
48
- private final static String SESSION_ALLOWED_PREFIX = "opengrok-attr-plugin-allowed" ;
49
- private String SESSION_ALLOWED = SESSION_ALLOWED_PREFIX ;
48
+ private static final String SESSION_ALLOWED_PREFIX = "opengrok-attr-plugin-allowed" ;
49
+ private String sessionAllowed = SESSION_ALLOWED_PREFIX ;
50
50
51
51
private String ldapAttr ;
52
52
private final Set <String > whitelist = new TreeSet <>();
53
53
54
54
public LdapAttrPlugin () {
55
- SESSION_ALLOWED += "-" + nextId ++;
55
+ sessionAllowed += "-" + nextId ++;
56
56
}
57
57
58
58
@ Override
@@ -78,7 +78,7 @@ public void load(Map<String, Object> parameters) {
78
78
@ Override
79
79
protected boolean sessionExists (HttpServletRequest req ) {
80
80
return super .sessionExists (req )
81
- && req .getSession ().getAttribute (SESSION_ALLOWED ) != null ;
81
+ && req .getSession ().getAttribute (sessionAllowed ) != null ;
82
82
}
83
83
84
84
@ SuppressWarnings ("unchecked" )
@@ -126,16 +126,16 @@ public void fillSession(HttpServletRequest req, User user) {
126
126
* @param allowed the new value
127
127
*/
128
128
protected void updateSession (HttpServletRequest req , boolean allowed ) {
129
- req .getSession ().setAttribute (SESSION_ALLOWED , allowed );
129
+ req .getSession ().setAttribute (sessionAllowed , allowed );
130
130
}
131
131
132
132
@ Override
133
133
public boolean checkEntity (HttpServletRequest request , Project project ) {
134
- return ((Boolean ) request .getSession ().getAttribute (SESSION_ALLOWED ));
134
+ return ((Boolean ) request .getSession ().getAttribute (sessionAllowed ));
135
135
}
136
136
137
137
@ Override
138
138
public boolean checkEntity (HttpServletRequest request , Group group ) {
139
- return ((Boolean ) request .getSession ().getAttribute (SESSION_ALLOWED ));
139
+ return ((Boolean ) request .getSession ().getAttribute (sessionAllowed ));
140
140
}
141
141
}
0 commit comments