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 2013/04/19 17:14:03 UTC
svn commit: r1469883 - in /syncope/trunk: ./
core/src/main/java/org/apache/syncope/core/rest/controller/
core/src/main/java/org/apache/syncope/core/workflow/user/activiti/
core/src/main/resources/ core/src/test/java/org/apache/syncope/core/rest/
Author: ilgrosso
Date: Fri Apr 19 15:14:03 2013
New Revision: 1469883
URL: http://svn.apache.org/r1469883
Log:
[SYNCOPE-364] Merge from 1_1_X
Modified:
syncope/trunk/ (props changed)
syncope/trunk/CHANGES
syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
syncope/trunk/core/src/main/resources/userWorkflow.bpmn20.xml
syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
Propchange: syncope/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Apr 19 15:14:03 2013
@@ -3,3 +3,4 @@ target
.settings
.project
.travis.yml.swp
+.CHANGES.swp
Propchange: syncope/trunk/
------------------------------------------------------------------------------
Merged /syncope/branches/1_0_X:r1468807-1469876
Merged /syncope/branches/1_1_X:r1469831-1469882
Modified: syncope/trunk/CHANGES
URL: http://svn.apache.org/viewvc/syncope/trunk/CHANGES?rev=1469883&r1=1469882&r2=1469883&view=diff
==============================================================================
--- syncope/trunk/CHANGES (original)
+++ syncope/trunk/CHANGES Fri Apr 19 15:14:03 2013
@@ -185,6 +185,17 @@ Release Notes - Syncope - Version 1.1.0
* [SYNCOPE-326] - Check console style (CSS) on Internet Explorer
* [SYNCOPE-350] - Provide Getting started / Standalone distribution
+Release Notes - Syncope - Version 1.0.8
+================================================================================
+** Bug
+ * [SYNCOPE-351] - Errors when editing role membership assignment in notifications (About and Recipients)
+
+** Improvement
+ * [SYNCOPE-348] - Email address validator regexp
+
+** Wish
+ * [SYNCOPE-340] - Translate items of Syncope UI and config files labels for Portuguese language
+
Release Notes - Syncope - Version 1.0.7
================================================================================
** Bug
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java?rev=1469883&r1=1469882&r2=1469883&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java Fri Apr 19 15:14:03 2013
@@ -602,19 +602,22 @@ public class UserController {
LOG.debug("About to process form {}", form);
WorkflowResult<Map.Entry<Long, String>> updated = uwfAdapter.submitForm(form,
- SecurityContextHolder.getContext().
- getAuthentication().getName());
+ SecurityContextHolder.getContext().getAuthentication().getName());
- List<PropagationTask> tasks = propagationManager.getUserUpdateTaskIds(
- new WorkflowResult<Map.Entry<Long, Boolean>>(
- new SimpleEntry<Long, Boolean>(updated.getResult().getKey(), Boolean.TRUE),
- updated.getPropByRes(),
- updated.getPerformedTasks()),
- updated.getResult().getValue(),
- null,
- null,
- null);
- taskExecutor.execute(tasks);
+ // propByRes can be made empty by the workflow definition is no propagation should occur
+ // (for example, with rejected users)
+ if (updated.getPropByRes() != null && !updated.getPropByRes().isEmpty()) {
+ List<PropagationTask> tasks = propagationManager.getUserUpdateTaskIds(
+ new WorkflowResult<Map.Entry<Long, Boolean>>(
+ new SimpleEntry<Long, Boolean>(updated.getResult().getKey(), Boolean.TRUE),
+ updated.getPropByRes(),
+ updated.getPerformedTasks()),
+ updated.getResult().getValue(),
+ null,
+ null,
+ null);
+ taskExecutor.execute(tasks);
+ }
final UserTO savedTO = binder.getUserTO(updated.getResult().getKey());
Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java?rev=1469883&r1=1469882&r2=1469883&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java Fri Apr 19 15:14:03 2013
@@ -650,8 +650,8 @@ public class ActivitiUserWorkflowAdapter
SyncopeUser updated = userDAO.save(user);
// see if there is any propagation to be done
- PropagationByResource propByRes = (PropagationByResource) runtimeService.getVariable(user.getWorkflowId(),
- PROP_BY_RESOURCE);
+ PropagationByResource propByRes =
+ (PropagationByResource) runtimeService.getVariable(user.getWorkflowId(), PROP_BY_RESOURCE);
// fetch - if available - the encrpted password
String clearPassword = null;
Modified: syncope/trunk/core/src/main/resources/userWorkflow.bpmn20.xml
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/userWorkflow.bpmn20.xml?rev=1469883&r1=1469882&r2=1469883&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/userWorkflow.bpmn20.xml (original)
+++ syncope/trunk/core/src/main/resources/userWorkflow.bpmn20.xml Fri Apr 19 15:14:03 2013
@@ -162,6 +162,7 @@ under the License.
<!-- Do something with rejectReason -->
<script>
def scriptVar = rejectReason
+ execution.setVariable("propByResource", null);
</script>
</scriptTask>
Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1469883&r1=1469882&r2=1469883&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Fri Apr 19 15:14:03 2013
@@ -560,6 +560,7 @@ public class UserTestITCase extends Abst
Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers());
UserTO userTO = getUniqueSampleTO("createWithReject@syncope.apache.org");
+ userTO.addResource("resource-testdb");
// User with role 9 are defined in workflow as subject to approval
MembershipTO membershipTO = new MembershipTO();
@@ -575,7 +576,6 @@ public class UserTestITCase extends Abst
// 2. request if there is any pending task for user just created
WorkflowFormTO form = userWorkflowService.getFormForUser(userTO.getId());
-
assertNotNull(form);
assertNotNull(form.getUserId());
assertEquals(userTO.getId(), form.getUserId());
@@ -611,6 +611,17 @@ public class UserTestITCase extends Abst
assertNotNull(userTO);
assertEquals("rejected", userTO.getStatus());
+ // 6. check that rejected user was not propagated to external resource (SYNCOPE-364)
+ JdbcTemplate jdbcTemplate = new JdbcTemplate(testDataSource);
+ Exception exception = null;
+ try {
+ jdbcTemplate.queryForObject("SELECT id FROM test WHERE id=?",
+ new String[] {userTO.getUsername()}, Integer.class);
+ } catch (EmptyResultDataAccessException e) {
+ exception = e;
+ }
+ assertNotNull(exception);
+
// reset admin credentials for restTemplate
super.resetRestTemplate();
}
@@ -619,8 +630,6 @@ public class UserTestITCase extends Abst
public void createWithApproval() {
Assume.assumeTrue(ActivitiDetector.isActivitiEnabledForUsers());
- JdbcTemplate jdbcTemplate = new JdbcTemplate(testDataSource);
-
UserTO userTO = getUniqueSampleTO("createWithApproval@syncope.apache.org");
userTO.addResource(RESOURCE_NAME_TESTDB);
@@ -639,10 +648,12 @@ public class UserTestITCase extends Abst
assertTrue(userTO.getPropagationStatusTOs().isEmpty());
+ JdbcTemplate jdbcTemplate = new JdbcTemplate(testDataSource);
+
Exception exception = null;
try {
jdbcTemplate.queryForObject("SELECT id FROM test WHERE id=?",
- new String[]{userTO.getUsername()}, Integer.class);
+ new String[] {userTO.getUsername()}, Integer.class);
} catch (EmptyResultDataAccessException e) {
exception = e;
}