You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2015/01/21 06:29:50 UTC
[1/8] syncope git commit: [SYNCOPE-629] TEMPLATE entities are
correctly exported
Repository: syncope
Updated Branches:
refs/heads/1_2_X 7b1c5ebeb -> f2d45fdd2
refs/heads/2_0_X 49ad3c7fb -> 961dfd372
refs/heads/master a1eead02d -> 8d270a1e1
[SYNCOPE-629] TEMPLATE entities are correctly exported
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7b1c5ebe
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7b1c5ebe
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7b1c5ebe
Branch: refs/heads/2_0_X
Commit: 7b1c5ebeb85c2b27aaf1177e931431fa1da68be0
Parents: f39739c
Author: giacomolm <gi...@hotmail.it>
Authored: Tue Jan 20 17:29:09 2015 +0100
Committer: giacomolm <gi...@hotmail.it>
Committed: Tue Jan 20 17:29:09 2015 +0100
----------------------------------------------------------------------
.../syncope/core/util/ContentExporter.java | 9 ++-
.../core/rest/ConfigurationTestITCase.java | 62 ++++++++++++++++++++
2 files changed, 70 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/7b1c5ebe/core/src/main/java/org/apache/syncope/core/util/ContentExporter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/util/ContentExporter.java b/core/src/main/java/org/apache/syncope/core/util/ContentExporter.java
index 5b34358..e7fd35b 100644
--- a/core/src/main/java/org/apache/syncope/core/util/ContentExporter.java
+++ b/core/src/main/java/org/apache/syncope/core/util/ContentExporter.java
@@ -70,6 +70,9 @@ public class ContentExporter extends AbstractContentDealer {
"SYNCOPEUSER", "UATTR", "UATTRVALUE", "UATTRUNIQUEVALUE", "UDERATTR", "UVIRATTR",
"MEMBERSHIP", "MATTR", "MATTRVALUE", "MATTRUNIQUEVALUE", "MDERATTR", "MVIRATTR"
}));
+
+ protected final static Set<String> TABLE_SUFFIXES_TO_BE_INCLUDED =
+ new HashSet<String>(Arrays.asList(new String[] {"TEMPLATE"}));
protected static final Map<String, String> TABLES_TO_BE_FILTERED =
Collections.singletonMap("TASK", "DTYPE <> 'PropagationTask'");
@@ -81,7 +84,11 @@ public class ContentExporter extends AbstractContentDealer {
boolean allowed = true;
for (String prefix : TABLE_PREFIXES_TO_BE_EXCLUDED) {
if (tableName.toUpperCase().startsWith(prefix)) {
- allowed = false;
+ for (String suffix : TABLE_SUFFIXES_TO_BE_INCLUDED) {
+ if (!tableName.toUpperCase().endsWith(suffix)) {
+ allowed = false;
+ }
+ }
}
}
return allowed;
http://git-wip-us.apache.org/repos/asf/syncope/blob/7b1c5ebe/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java b/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
index 01c3d2b..cbe13d5 100644
--- a/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
+++ b/core/src/test/java/org/apache/syncope/core/rest/ConfigurationTestITCase.java
@@ -31,11 +31,13 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.common.SyncopeConstants;
import org.apache.syncope.common.to.ConfTO;
import org.apache.syncope.common.types.EntityViolationType;
import org.apache.syncope.common.SyncopeClientException;
import org.apache.syncope.common.to.AttributeTO;
+import org.apache.syncope.common.to.RoleTO;
import org.apache.syncope.common.to.SchemaTO;
import org.apache.syncope.common.types.AttributableType;
import org.apache.syncope.common.types.AttributeSchemaType;
@@ -149,4 +151,64 @@ public class ConfigurationTestITCase extends AbstractTest {
assertTrue(e.getElements().iterator().next().contains(EntityViolationType.InvalidName.name()));
}
}
+
+ @Test
+ public void issueSYNCOPE629() throws IOException{
+ SchemaTO membershipKey = new SchemaTO();
+ membershipKey.setName("membershipKey"+getUUIDString());
+ membershipKey.setType(AttributeSchemaType.String);
+ createSchema(AttributableType.MEMBERSHIP, SchemaType.NORMAL, membershipKey);
+
+ SchemaTO roleKey = new SchemaTO();
+ roleKey.setName("roleKey"+getUUIDString());
+ roleKey.setType(AttributeSchemaType.String);
+ createSchema(AttributableType.ROLE, SchemaType.NORMAL, roleKey);
+
+ RoleTO roleTO = new RoleTO();
+ roleTO.setName("aRole" + getUUIDString());
+ roleTO.setParent(8L);
+ // verify inheritance password and account policies
+ roleTO.setInheritAccountPolicy(false);
+ // not inherited so setter execution shouldn't be ignored
+ roleTO.setAccountPolicy(6L);
+ roleTO.setInheritPasswordPolicy(true);
+ // inherited so setter execution should be ignored
+ roleTO.setPasswordPolicy(2L);
+ roleTO.getRAttrTemplates().add("icon");
+ roleTO.getAttrs().add(attributeTO("icon", "anIcon"));
+ roleTO.getResources().add(RESOURCE_NAME_LDAP);
+ roleTO.getMAttrTemplates().add(membershipKey.getName());
+ roleTO.getRAttrTemplates().add(roleKey.getName());
+ RoleTO testRole = createRole(roleTO);
+
+ Response response = configurationService.export();
+ assertNotNull(response);
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusInfo().getStatusCode());
+ assertTrue(response.getMediaType().toString().startsWith(MediaType.TEXT_XML));
+ String contentDisposition = response.getHeaderString(HttpHeaders.CONTENT_DISPOSITION);
+ assertNotNull(contentDisposition);
+
+ Object entity = response.getEntity();
+ assertTrue(entity instanceof InputStream);
+ String configExport = IOUtils.toString((InputStream) entity, SyncopeConstants.DEFAULT_ENCODING);
+ assertFalse(configExport.isEmpty());
+ assertTrue(configExport.length() > 1000);
+
+ String[] result = StringUtils.substringsBetween(configExport, "<RATTRTEMPLATE", "/>");
+ boolean rattrExists = false;
+ for(String entry : result){
+ if(entry.contains(roleKey.getName())) rattrExists = true;
+ }
+ assertTrue(rattrExists);
+
+ result = StringUtils.substringsBetween(configExport, "<MATTRTEMPLATE", "/>");
+ boolean mattrExists = false;
+ for(String entry : result){
+ if(entry.contains(membershipKey.getName())) mattrExists = true;
+ }
+ assertTrue(mattrExists);
+
+ deleteRole(testRole.getId());
+
+ }
}
[3/8] syncope git commit: Upgrading GPG plugin
Posted by il...@apache.org.
Upgrading GPG plugin
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f2d45fdd
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f2d45fdd
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f2d45fdd
Branch: refs/heads/1_2_X
Commit: f2d45fdd29e6b938ebb5938f818b612d5e985047
Parents: 7b1c5eb
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 21 06:28:37 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 21 06:28:37 2015 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/f2d45fdd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index da0954d..70d275d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1506,7 +1506,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
- <version>1.5</version>
+ <version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
[6/8] syncope git commit: Merge branch '1_2_X'
Posted by il...@apache.org.
Merge branch '1_2_X'
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8d270a1e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8d270a1e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8d270a1e
Branch: refs/heads/master
Commit: 8d270a1e1771573e85b7519260f0cc91b1508bb8
Parents: a1eead0 f2d45fd
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 21 06:28:52 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 21 06:28:52 2015 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/8d270a1e/pom.xml
----------------------------------------------------------------------
[8/8] syncope git commit: Merge branch 'master' into 2_0_X
Posted by il...@apache.org.
Merge branch 'master' into 2_0_X
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/961dfd37
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/961dfd37
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/961dfd37
Branch: refs/heads/2_0_X
Commit: 961dfd372313151ef6a85bb96d2e4dbe01ab9f02
Parents: 49ad3c7 8d270a1
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 21 06:29:13 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 21 06:29:13 2015 +0100
----------------------------------------------------------------------
.../syncope/core/util/ContentExporter.java | 9 ++-
.../core/rest/ConfigurationTestITCase.java | 62 ++++++++++++++++++++
pom.xml | 2 +-
3 files changed, 71 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/961dfd37/pom.xml
----------------------------------------------------------------------
[5/8] syncope git commit: Upgrading GPG plugin
Posted by il...@apache.org.
Upgrading GPG plugin
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f2d45fdd
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f2d45fdd
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f2d45fdd
Branch: refs/heads/master
Commit: f2d45fdd29e6b938ebb5938f818b612d5e985047
Parents: 7b1c5eb
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 21 06:28:37 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 21 06:28:37 2015 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/f2d45fdd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index da0954d..70d275d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1506,7 +1506,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
- <version>1.5</version>
+ <version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
[4/8] syncope git commit: Upgrading GPG plugin
Posted by il...@apache.org.
Upgrading GPG plugin
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/f2d45fdd
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/f2d45fdd
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/f2d45fdd
Branch: refs/heads/2_0_X
Commit: f2d45fdd29e6b938ebb5938f818b612d5e985047
Parents: 7b1c5eb
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 21 06:28:37 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 21 06:28:37 2015 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/f2d45fdd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index da0954d..70d275d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1506,7 +1506,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
- <version>1.5</version>
+ <version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
[7/8] syncope git commit: Merge branch '1_2_X'
Posted by il...@apache.org.
Merge branch '1_2_X'
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8d270a1e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8d270a1e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8d270a1e
Branch: refs/heads/2_0_X
Commit: 8d270a1e1771573e85b7519260f0cc91b1508bb8
Parents: a1eead0 f2d45fd
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Wed Jan 21 06:28:52 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Wed Jan 21 06:28:52 2015 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/8d270a1e/pom.xml
----------------------------------------------------------------------
[2/8] syncope git commit: Merge branch '1_2_X'
Posted by il...@apache.org.
Merge branch '1_2_X'
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a1eead02
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a1eead02
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a1eead02
Branch: refs/heads/2_0_X
Commit: a1eead02d2caa7ddf2218bc2d7fe8da97c5515e6
Parents: eca7585 7b1c5eb
Author: giacomolm <gi...@hotmail.it>
Authored: Tue Jan 20 17:30:26 2015 +0100
Committer: giacomolm <gi...@hotmail.it>
Committed: Tue Jan 20 17:30:26 2015 +0100
----------------------------------------------------------------------
.../syncope/core/util/ContentExporter.java | 9 ++-
.../core/rest/ConfigurationTestITCase.java | 62 ++++++++++++++++++++
2 files changed, 70 insertions(+), 1 deletion(-)
----------------------------------------------------------------------