File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed
test/opengrok/auth/plugin Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 40
40
*
41
41
* @author Krystof Tulinger
42
42
*/
43
- public class LdapAttr extends AbstractLdapPlugin {
43
+ public class LdapAttrPlugin extends AbstractLdapPlugin {
44
44
45
45
protected static final String ATTR_PARAM = "attribute" ;
46
46
protected static final String FILE_PARAM = "file" ;
@@ -50,7 +50,7 @@ public class LdapAttr extends AbstractLdapPlugin {
50
50
private String ldapAttr ;
51
51
private final Set <String > whitelist = new TreeSet <>();
52
52
53
- public LdapAttr () {
53
+ public LdapAttrPlugin () {
54
54
SESSION_ALLOWED += "-" + nextId ++;
55
55
}
56
56
Original file line number Diff line number Diff line change 39
39
*
40
40
* @author Krystof Tulinger
41
41
*/
42
- public class LdapFilter extends AbstractLdapPlugin {
42
+ public class LdapFilterPlugin extends AbstractLdapPlugin {
43
43
44
- private static final Logger LOGGER = Logger .getLogger (LdapFilter .class .getName ());
44
+ private static final Logger LOGGER = Logger .getLogger (LdapFilterPlugin .class .getName ());
45
45
46
46
protected static final String FILTER_PARAM = "filter" ;
47
47
protected String SESSION_ALLOWED = "opengrok-filter-plugin-allowed" ;
48
48
49
49
private String ldapFilter ;
50
50
51
- public LdapFilter () {
51
+ public LdapFilterPlugin () {
52
52
SESSION_ALLOWED += "-" + nextId ++;
53
53
}
54
54
Original file line number Diff line number Diff line change 48
48
public class LdapAttrTest {
49
49
50
50
private HttpServletRequest dummyRequest ;
51
- private LdapAttr plugin ;
51
+ private LdapAttrPlugin plugin ;
52
52
private AuthorizationFramework framework ;
53
53
54
54
private static File whitelistFile ;
@@ -70,11 +70,12 @@ public static void afterClass() {
70
70
71
71
@ Before
72
72
public void setUp () {
73
- plugin = new LdapAttr ();
73
+ plugin = new LdapAttrPlugin ();
74
74
Map <String , Object > parameters = new TreeMap <>();
75
+
75
76
parameters .put (AbstractLdapPlugin .FAKE_PARAM , true );
76
- parameters .put (LdapAttr .FILE_PARAM , whitelistFile .getAbsolutePath ());
77
- parameters .put (LdapAttr .ATTR_PARAM , "mail" );
77
+ parameters .put (LdapAttrPlugin .FILE_PARAM , whitelistFile .getAbsolutePath ());
78
+ parameters .put (LdapAttrPlugin .ATTR_PARAM , "mail" );
78
79
79
80
plugin .load (parameters );
80
81
Original file line number Diff line number Diff line change 33
33
34
34
public class LdapFilterTest {
35
35
36
- private LdapFilter plugin ;
36
+ private LdapFilterPlugin plugin ;
37
37
38
38
@ Before
39
39
public void setUp () {
40
- plugin = new LdapFilter ();
40
+ plugin = new LdapFilterPlugin ();
41
41
}
42
42
43
43
@ Test
You can’t perform that action at this time.
0 commit comments