-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GSIP-164] Promote geofence modules from Community to Extension
- Loading branch information
Alessio Fabiani
committed
Aug 16, 2018
1 parent
7e8e746
commit 01bc4f4
Showing
47 changed files
with
542 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...geofence-server/src/test/java/org/geoserver/geofence/web/GeofenceServerAdminPageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,53 @@ | |||
/* (c) 2018 Open Source Geospatial Foundation - all rights reserved | |||
* This code is licensed under the GPL 2.0 license, available at the root | |||
* application directory. | |||
*/ | |||
package org.geoserver.geofence.web; | |||
|
|||
import static org.junit.Assert.assertEquals; | |||
|
|||
import org.apache.wicket.ajax.markup.html.AjaxLink; | |||
import org.apache.wicket.util.tester.FormTester; | |||
import org.geoserver.data.test.SystemTestData; | |||
import org.geoserver.geofence.config.GeoFencePropertyPlaceholderConfigurer; | |||
import org.geoserver.geofence.services.dto.ShortAdminRule; | |||
import org.geoserver.web.GeoServerWicketTestSupport; | |||
import org.geoserver.web.wicket.GeoServerTablePanel; | |||
import org.junit.Before; | |||
import org.junit.Test; | |||
|
|||
public class GeofenceServerAdminPageTest extends GeoServerWicketTestSupport { | |||
|
|||
static GeoFencePropertyPlaceholderConfigurer configurer; | |||
|
|||
@Override | |||
protected void onSetUp(SystemTestData testData) throws Exception { | |||
super.onSetUp(testData); | |||
} | |||
|
|||
@Before | |||
public void before() { | |||
login(); | |||
tester.startPage(GeofenceServerAdminPage.class); | |||
} | |||
|
|||
@Test | |||
public void testAddNewRuleLink() { | |||
tester.assertRenderedPage(GeofenceServerAdminPage.class); | |||
tester.assertComponent("addNew", AjaxLink.class); | |||
tester.clickLink("addNew"); | |||
tester.assertRenderedPage(GeofenceAdminRulePage.class); | |||
|
|||
// submit a new rule | |||
FormTester form = tester.newFormTester("form"); | |||
form.submit("save"); | |||
|
|||
tester.assertRenderedPage(GeofenceServerAdminPage.class); | |||
|
|||
// check the rules model | |||
GeoServerTablePanel<ShortAdminRule> rulesPanel = | |||
(GeoServerTablePanel<ShortAdminRule>) | |||
tester.getComponentFromLastRenderedPage("rulesPanel"); | |||
assertEquals(1, rulesPanel.getDataProvider().size()); | |||
} | |||
} |
53 changes: 53 additions & 0 deletions
53
...nity/geofence-server/src/test/java/org/geoserver/geofence/web/GeofenceServerPageTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,53 @@ | |||
/* (c) 2018 Open Source Geospatial Foundation - all rights reserved | |||
* This code is licensed under the GPL 2.0 license, available at the root | |||
* application directory. | |||
*/ | |||
package org.geoserver.geofence.web; | |||
|
|||
import static org.junit.Assert.assertEquals; | |||
|
|||
import org.apache.wicket.ajax.markup.html.AjaxLink; | |||
import org.apache.wicket.util.tester.FormTester; | |||
import org.geoserver.data.test.SystemTestData; | |||
import org.geoserver.geofence.config.GeoFencePropertyPlaceholderConfigurer; | |||
import org.geoserver.geofence.services.dto.ShortAdminRule; | |||
import org.geoserver.web.GeoServerWicketTestSupport; | |||
import org.geoserver.web.wicket.GeoServerTablePanel; | |||
import org.junit.Before; | |||
import org.junit.Test; | |||
|
|||
public class GeofenceServerPageTest extends GeoServerWicketTestSupport { | |||
|
|||
static GeoFencePropertyPlaceholderConfigurer configurer; | |||
|
|||
@Override | |||
protected void onSetUp(SystemTestData testData) throws Exception { | |||
super.onSetUp(testData); | |||
} | |||
|
|||
@Before | |||
public void before() { | |||
login(); | |||
tester.startPage(GeofenceServerPage.class); | |||
} | |||
|
|||
@Test | |||
public void testAddNewRuleLink() { | |||
tester.assertRenderedPage(GeofenceServerPage.class); | |||
tester.assertComponent("addNew", AjaxLink.class); | |||
tester.clickLink("addNew"); | |||
tester.assertRenderedPage(GeofenceRulePage.class); | |||
|
|||
// submit a new rule | |||
FormTester form = tester.newFormTester("form"); | |||
form.submit("save"); | |||
|
|||
tester.assertRenderedPage(GeofenceServerPage.class); | |||
|
|||
// check the rules model | |||
GeoServerTablePanel<ShortAdminRule> rulesPanel = | |||
(GeoServerTablePanel<ShortAdminRule>) | |||
tester.getComponentFromLastRenderedPage("rulesPanel"); | |||
assertEquals(1, rulesPanel.getDataProvider().size()); | |||
} | |||
} |
21 changes: 3 additions & 18 deletions
21
src/community/geofence/src/main/java/org/geoserver/geofence/GeofenceAccessManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 3 additions & 19 deletions
22
src/community/geofence/src/main/java/org/geoserver/geofence/cache/CacheConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 3 additions & 18 deletions
21
src/community/geofence/src/main/java/org/geoserver/geofence/cache/CachedRuleReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 3 additions & 18 deletions
21
...community/geofence/src/main/java/org/geoserver/geofence/config/GeoFenceConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 3 additions & 19 deletions
22
...geofence/src/main/java/org/geoserver/geofence/config/GeoFenceConfigurationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 3 additions & 19 deletions
22
...ty/geofence/src/main/java/org/geoserver/geofence/config/GeoFenceConfigurationManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.