You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by an...@apache.org on 2018/12/05 16:56:21 UTC
[syncope] branch master updated: fixed enduser tests,
minor code improvements and managed user requests paths as other
extensions
This is an automated email from the ASF dual-hosted git repository.
andreapatricelli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new f221f6a fixed enduser tests, minor code improvements and managed user requests paths as other extensions
f221f6a is described below
commit f221f6acbddcd601265cf1db3a69046c72f97cc9
Author: Andrea Patricelli <an...@apache.org>
AuthorDate: Wed Dec 5 17:47:41 2018 +0100
fixed enduser tests, minor code improvements and managed user requests paths as other extensions
---
.../main/resources/archetype-resources/enduser/pom.xml | 6 ++++++
.../src/main/resources/META-INF/resources/app/js/app.js | 16 ++++++++++++----
.../resources/app/js/controllers/UserController.js | 9 ---------
client/enduser/src/main/resources/customTemplate.json | 6 ------
.../client/enduser/resources/BpmnProcessList.java | 3 ---
.../enduser/resources/UserRequestCancelResource.java | 2 --
.../enduser/resources/UserRequestFormClaimResource.java | 3 ---
.../enduser/resources/UserRequestsFormsResource.java | 3 ---
.../src/main/resources/customTemplate.json | 3 ---
.../src/test/resources/customTemplate.json | 6 ------
fit/enduser-reference/src/test/resources/tests/create.js | 2 +-
11 files changed, 19 insertions(+), 40 deletions(-)
diff --git a/archetype/src/main/resources/archetype-resources/enduser/pom.xml b/archetype/src/main/resources/archetype-resources/enduser/pom.xml
index 0c03dec..e1e37c7 100644
--- a/archetype/src/main/resources/archetype-resources/enduser/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/enduser/pom.xml
@@ -342,6 +342,12 @@ under the License.
<artifactId>syncope-ext-oidcclient-client-enduser</artifactId>
<version>${syncope.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.syncope.ext.flowable</groupId>
+ <artifactId>syncope-ext-flowable-client-enduser</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
index 18f0d53..f95093e 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/app.js
@@ -226,6 +226,7 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translate
}]
}
})
+ /* <Extensions> */
.state('update.userRequests', {
url: '/user-requests',
templateUrl: 'views/user-requests.html',
@@ -246,6 +247,7 @@ app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translate
}]
}
})
+ /* </Extensions> */
.state('update.finish', {
url: '/finish',
templateUrl: 'views/user-form-finish.html',
@@ -447,12 +449,18 @@ app.controller('ApplicationController', ['$scope', '$rootScope', 'InfoService',
$rootScope.dynTemplate = response;
/*
- * Wizard steps from JSON
+ * Wizard steps from JSON, if some extensions are enabled add steps dynamically
*/
$scope.wizard = response.wizard.steps;
$scope.creationWizard = $scope.clone($scope.wizard);
- delete $scope.creationWizard['userRequests'];
- delete $scope.creationWizard['userRequestForms'];
+ /* <Extensions> */
+ $scope.wizard.userRequests = {
+ "url": "/user-requests"
+ };
+ $scope.wizard.userRequestForms = {
+ "url": "/user-request-forms"
+ };
+ /* </Extensions> */
$scope.wizardFirstStep = response.wizard.firstStep;
callback($rootScope.dynTemplate);
@@ -575,7 +583,7 @@ app.controller('ApplicationController', ['$scope', '$rootScope', 'InfoService',
/*
* Date formatters
*/
-
+
// from timestamp
$rootScope.formatDate = function (timestamp) {
return new Date(timestamp).toLocaleString();
diff --git a/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js b/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
index f81747b..d997542 100644
--- a/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
+++ b/client/enduser/src/main/resources/META-INF/resources/app/js/controllers/UserController.js
@@ -338,15 +338,6 @@ angular.module("self").controller("UserController", ['$scope', '$rootScope', '$l
initUserSchemas();
// initialize available resources
initResources();
- // initialize user requests
-// if (!$scope.createMode && $scope.wizard.userRequests) {
-// console.debug("About to init user requests data");
-// initBpmnProcesses();
-// // this call will ever get the first 10 User Requests
-// initUserRequests();
-// // this call will ever get the first 10 User Requests Forms
-// initUserRequestsForms();
-// }
};
var readUser = function () {
diff --git a/client/enduser/src/main/resources/customTemplate.json b/client/enduser/src/main/resources/customTemplate.json
index 12c7f3b..e55ed4c 100644
--- a/client/enduser/src/main/resources/customTemplate.json
+++ b/client/enduser/src/main/resources/customTemplate.json
@@ -74,12 +74,6 @@
"resources": {
"url": "/resources"
},
- "userRequests": {
- "url": "/user-requests"
- },
- "userRequestForms": {
- "url": "/user-request-forms"
- },
"finish": {
"url": "/finish"
}
diff --git a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/BpmnProcessList.java b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/BpmnProcessList.java
index 4b8d80b..e629754 100644
--- a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/BpmnProcessList.java
+++ b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/BpmnProcessList.java
@@ -18,9 +18,6 @@
*/
package org.apache.syncope.client.enduser.resources;
-import static org.apache.syncope.client.enduser.resources.BaseResource.LOG;
-import static org.apache.syncope.client.enduser.resources.BaseResource.MAPPER;
-
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
diff --git a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestCancelResource.java b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestCancelResource.java
index 4012b69..3e1116b 100644
--- a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestCancelResource.java
+++ b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestCancelResource.java
@@ -18,8 +18,6 @@
*/
package org.apache.syncope.client.enduser.resources;
-import static org.apache.syncope.client.enduser.resources.BaseResource.LOG;
-
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.servlet.http.HttpServletRequest;
diff --git a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestFormClaimResource.java b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestFormClaimResource.java
index a342c7f..f7b9420 100644
--- a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestFormClaimResource.java
+++ b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestFormClaimResource.java
@@ -18,9 +18,6 @@
*/
package org.apache.syncope.client.enduser.resources;
-import static org.apache.syncope.client.enduser.resources.BaseResource.LOG;
-import static org.apache.syncope.client.enduser.resources.BaseResource.MAPPER;
-
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import javax.servlet.http.HttpServletRequest;
diff --git a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestsFormsResource.java b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestsFormsResource.java
index f303070..c51027b 100644
--- a/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestsFormsResource.java
+++ b/ext/flowable/syncope-ext-flowable-client-enduser/src/main/java/org/apache/syncope/client/enduser/resources/UserRequestsFormsResource.java
@@ -18,9 +18,6 @@
*/
package org.apache.syncope.client.enduser.resources;
-import static org.apache.syncope.client.enduser.resources.BaseResource.LOG;
-import static org.apache.syncope.client.enduser.resources.BaseResource.MAPPER;
-
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
diff --git a/fit/enduser-reference/src/main/resources/customTemplate.json b/fit/enduser-reference/src/main/resources/customTemplate.json
index 7223610..e55ed4c 100644
--- a/fit/enduser-reference/src/main/resources/customTemplate.json
+++ b/fit/enduser-reference/src/main/resources/customTemplate.json
@@ -74,9 +74,6 @@
"resources": {
"url": "/resources"
},
- "userRequests": {
- "url": "/user-requests"
- },
"finish": {
"url": "/finish"
}
diff --git a/fit/enduser-reference/src/test/resources/customTemplate.json b/fit/enduser-reference/src/test/resources/customTemplate.json
index 12c7f3b..e55ed4c 100644
--- a/fit/enduser-reference/src/test/resources/customTemplate.json
+++ b/fit/enduser-reference/src/test/resources/customTemplate.json
@@ -74,12 +74,6 @@
"resources": {
"url": "/resources"
},
- "userRequests": {
- "url": "/user-requests"
- },
- "userRequestForms": {
- "url": "/user-request-forms"
- },
"finish": {
"url": "/finish"
}
diff --git a/fit/enduser-reference/src/test/resources/tests/create.js b/fit/enduser-reference/src/test/resources/tests/create.js
index b1f049f..87e1f82 100644
--- a/fit/enduser-reference/src/test/resources/tests/create.js
+++ b/fit/enduser-reference/src/test/resources/tests/create.js
@@ -64,7 +64,7 @@ describe('syncope enduser user create', function () {
}
//finish: breadcrumb should be clickable, testing navigation
for (var i = 0; i < 5; i++) {
- element.all(by.repeater('(key, value) in wizard')).get(i).click();
+ element.all(by.repeater('(key, value) in (createMode ? creationWizard : wizard)')).get(i).click();
browser.wait(element(by.id('finish')).isPresent());
element.all(by.id('finish')).last().click();
}