-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#219: improvements to the LDAP compatible DAOs to fully replace the s…
…tandard ones in a MapStore standard security configuration (#220) * #219: improvements to the LDAP compatible DAOs to fully replace the standard ones in a MapStore stadanrd security configuration * Update src/core/persistence/src/main/java/it/geosolutions/geostore/core/dao/ldap/impl/UserDAOImpl.java Co-authored-by: Lorenzo Natali <offtherailz@gmail.com> Co-authored-by: Lorenzo Natali <offtherailz@gmail.com>
- Loading branch information
1 parent
d22d469
commit 110018b
Showing
13 changed files
with
613 additions
and
223 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
42 changes: 42 additions & 0 deletions
42
src/core/model/src/test/java/it/geosolutions/geostore/core/model/GroupReservedNamesTest.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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (C) 2021 - 2011 GeoSolutions S.A.S. http://www.geo-solutions.it | ||
* | ||
* GPLv3 + Classpath exception | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the | ||
* GNU General Public License as published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without | ||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If | ||
* not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package it.geosolutions.geostore.core.model; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Set; | ||
import org.junit.Test; | ||
import it.geosolutions.geostore.core.model.enums.GroupReservedNames; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
public class GroupReservedNamesTest { | ||
@Test | ||
public void testRemoveReserved() { | ||
List<UserGroup> groups = new ArrayList<UserGroup>(); | ||
UserGroup everyOne = new UserGroup(); | ||
everyOne.setGroupName(GroupReservedNames.EVERYONE.groupName()); | ||
groups.add(everyOne); | ||
UserGroup sample = new UserGroup(); | ||
sample.setGroupName("sample"); | ||
groups.add(sample); | ||
|
||
Set<UserGroup> result = GroupReservedNames.checkReservedGroups(groups); | ||
|
||
assertEquals(1, result.size()); | ||
assertEquals("sample", result.iterator().next().getGroupName()); | ||
} | ||
} |
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
Oops, something went wrong.