mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			32 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | d28d4873be | ||
|  | 44d7c2328c | ||
|  | 073338afa7 | ||
|  | 3e53467ac8 | ||
|  | 0d5ffdac2e | ||
|  | ac03eb7642 | ||
|  | 2ff5b7dd0a | ||
|  | b0d7e6dfba | ||
|  | 3304a62a35 | ||
|  | 763591c1a3 | ||
|  | 6de5a507fe | ||
|  | 3990bc9db4 | ||
|  | f2207fe43e | ||
|  | f48db84334 | ||
|  | 98d73b7200 | ||
|  | acd4b1efcb | ||
|  | 4433dd009a | ||
|  | d1a9794ec8 | ||
|  | bf848ff882 | ||
|  | 69ebccfc20 | ||
|  | 600b50fce1 | ||
|  | 37e8586658 | ||
|  | 4b12ed5a51 | ||
|  | e379b7704d | ||
|  | 297be122a6 | ||
|  | ca28024ad8 | ||
|  | cfd3255aa7 | ||
|  | 4e436160cc | ||
|  | bf0ca4ca83 | ||
|  | e23a97960f | ||
|  | 2d2371a792 | ||
|  | 0ea69dd4ef | 
| @@ -157,10 +157,10 @@ jobs: | |||||||
|         - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1 |         - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1 | ||||||
|       script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver |       script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver | ||||||
|  |  | ||||||
|     - name: "Repository - MySQL 5.7.23 tests" |     - name: "Repository - MySQL 5.7.28 tests" | ||||||
|       if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/ |       if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/ | ||||||
|       before_script: |       before_script: | ||||||
|         - docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco  mysql:5.7.23 --transaction-isolation='READ-COMMITTED' --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci |         - docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco  mysql:5.7.28 --transaction-isolation='READ-COMMITTED' --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci | ||||||
|         - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1 |         - docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1 | ||||||
|       script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco |       script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco | ||||||
|  |  | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-community-repo-amps</artifactId> |       <artifactId>alfresco-community-repo-amps</artifactId> | ||||||
|       <version>14.146-SNAPSHOT</version> |       <version>15.9</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <modules> |    <modules> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> |       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||||
|       <version>14.146-SNAPSHOT</version> |       <version>15.9</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <modules> |    <modules> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-governance-services-automation-community-repo</artifactId> |       <artifactId>alfresco-governance-services-automation-community-repo</artifactId> | ||||||
|       <version>14.146-SNAPSHOT</version> |       <version>15.9</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <build> |    <build> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> |       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||||
|       <version>14.146-SNAPSHOT</version> |       <version>15.9</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <modules> |    <modules> | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-governance-services-community-repo-parent</artifactId> |       <artifactId>alfresco-governance-services-community-repo-parent</artifactId> | ||||||
|       <version>14.146-SNAPSHOT</version> |       <version>15.9</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <properties> |    <properties> | ||||||
|   | |||||||
| @@ -4,8 +4,8 @@ | |||||||
|  |  | ||||||
| # Version label | # Version label | ||||||
| version.major=7 | version.major=7 | ||||||
| version.minor=0 | version.minor=2 | ||||||
| version.revision=0 | version.revision=1 | ||||||
| version.label= | version.label= | ||||||
|  |  | ||||||
| # Edition label | # Edition label | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-governance-services-community-repo-parent</artifactId> |         <artifactId>alfresco-governance-services-community-repo-parent</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo</artifactId> |         <artifactId>alfresco-community-repo</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <modules> |     <modules> | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-amps</artifactId> |         <artifactId>alfresco-community-repo-amps</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
|   | |||||||
| @@ -176,7 +176,6 @@ public class NodeBrowserScript extends NodeBrowserPost implements Serializable | |||||||
| 			{ | 			{ | ||||||
| 				status.setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); | 				status.setCode(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); | ||||||
| 				status.setMessage(e.getMessage()); | 				status.setMessage(e.getMessage()); | ||||||
| 				status.setException(e); |  | ||||||
| 				status.setRedirect(true); | 				status.setRedirect(true); | ||||||
| 			} | 			} | ||||||
|     		return tmplMap; |     		return tmplMap; | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|    <parent> |    <parent> | ||||||
|       <groupId>org.alfresco</groupId> |       <groupId>org.alfresco</groupId> | ||||||
|       <artifactId>alfresco-community-repo</artifactId> |       <artifactId>alfresco-community-repo</artifactId> | ||||||
|       <version>14.146-SNAPSHOT</version> |       <version>15.9</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <dependencies> |    <dependencies> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo</artifactId> |         <artifactId>alfresco-community-repo</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo</artifactId> |         <artifactId>alfresco-community-repo</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
|   | |||||||
| @@ -9,6 +9,6 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> |         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
| </project> | </project> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> |         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo</artifactId> |         <artifactId>alfresco-community-repo</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <modules> |     <modules> | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> |         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <modules> |     <modules> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ import org.testng.annotations.Test; | |||||||
|  */ |  */ | ||||||
| public class GetProcessSanityTests extends RestTest | public class GetProcessSanityTests extends RestTest | ||||||
| { | { | ||||||
|     private UserModel userWhoStartsProcess, assignee; |     private UserModel userWhoStartsProcess, assignee, user; | ||||||
|     private RestProcessModel addedProcess, process; |     private RestProcessModel addedProcess, process; | ||||||
|  |  | ||||||
|     @BeforeClass(alwaysRun = true) |     @BeforeClass(alwaysRun = true) | ||||||
| @@ -24,6 +24,7 @@ public class GetProcessSanityTests extends RestTest | |||||||
|     { |     { | ||||||
|         userWhoStartsProcess = dataUser.createRandomTestUser(); |         userWhoStartsProcess = dataUser.createRandomTestUser(); | ||||||
|         assignee = dataUser.createRandomTestUser(); |         assignee = dataUser.createRandomTestUser(); | ||||||
|  |         user = dataUser.createRandomTestUser(); | ||||||
|         addedProcess = restClient.authenticateUser(userWhoStartsProcess).withWorkflowAPI().addProcess("activitiAdhoc", assignee, false, CMISUtil.Priority.High); |         addedProcess = restClient.authenticateUser(userWhoStartsProcess).withWorkflowAPI().addProcess("activitiAdhoc", assignee, false, CMISUtil.Priority.High); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -59,4 +60,13 @@ public class GetProcessSanityTests extends RestTest | |||||||
|         process.assertThat().field("id").is(addedProcess.getId()) |         process.assertThat().field("id").is(addedProcess.getId()) | ||||||
|                 .and().field("startUserId").is(addedProcess.getStartUserId()); |                 .and().field("startUserId").is(addedProcess.getStartUserId()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @TestRail(section = { TestGroup.REST_API, TestGroup.PROCESSES }, executionType = ExecutionType.SANITY, | ||||||
|  |             description = "Verify User that is not involved in a process cannot get that process using REST API and status code is FORBIDDEN (403)") | ||||||
|  |     @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.PROCESSES, TestGroup.SANITY }) | ||||||
|  |     public void shouldNotGetProcessesByNotInvolvedUser() throws Exception | ||||||
|  |     { | ||||||
|  |         process = restClient.authenticateUser(user).withWorkflowAPI().usingProcess(addedProcess).getProcess(); | ||||||
|  |         restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN); | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> |         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								pom.xml
									
									
									
									
									
								
							| @@ -2,7 +2,7 @@ | |||||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||||
|     <modelVersion>4.0.0</modelVersion> |     <modelVersion>4.0.0</modelVersion> | ||||||
|     <artifactId>alfresco-community-repo</artifactId> |     <artifactId>alfresco-community-repo</artifactId> | ||||||
|     <version>14.146-SNAPSHOT</version>  |     <version>15.9</version> | ||||||
|     <packaging>pom</packaging> |     <packaging>pom</packaging> | ||||||
|     <name>Alfresco Community Repo Parent</name> |     <name>Alfresco Community Repo Parent</name> | ||||||
|  |  | ||||||
| @@ -25,7 +25,7 @@ | |||||||
|     <properties> |     <properties> | ||||||
|         <acs.version.major>7</acs.version.major> |         <acs.version.major>7</acs.version.major> | ||||||
|         <acs.version.minor>2</acs.version.minor> |         <acs.version.minor>2</acs.version.minor> | ||||||
|         <acs.version.revision>0</acs.version.revision> |         <acs.version.revision>1</acs.version.revision> | ||||||
|         <acs.version.label /> |         <acs.version.label /> | ||||||
|         <amp.min.version>${acs.version.major}.0.0</amp.min.version> |         <amp.min.version>${acs.version.major}.0.0</amp.min.version> | ||||||
|  |  | ||||||
| @@ -55,19 +55,19 @@ | |||||||
|         <dependency.alfresco-greenmail.version>6.2</dependency.alfresco-greenmail.version> |         <dependency.alfresco-greenmail.version>6.2</dependency.alfresco-greenmail.version> | ||||||
|         <dependency.acs-event-model.version>0.0.13</dependency.acs-event-model.version> |         <dependency.acs-event-model.version>0.0.13</dependency.acs-event-model.version> | ||||||
|  |  | ||||||
|         <dependency.spring.version>5.3.15</dependency.spring.version> |         <dependency.spring.version>5.3.18</dependency.spring.version> | ||||||
|         <dependency.antlr.version>3.5.2</dependency.antlr.version> |         <dependency.antlr.version>3.5.2</dependency.antlr.version> | ||||||
|         <dependency.jackson.version>2.13.1</dependency.jackson.version> |         <dependency.jackson.version>2.13.3</dependency.jackson.version> | ||||||
|         <dependency.jackson-databind.version>2.13.1</dependency.jackson-databind.version> |         <dependency.jackson-databind.version>2.13.3</dependency.jackson-databind.version> | ||||||
|         <dependency.cxf.version>3.5.0</dependency.cxf.version> |         <dependency.cxf.version>3.5.0</dependency.cxf.version> | ||||||
|         <dependency.opencmis.version>1.0.0</dependency.opencmis.version> |         <dependency.opencmis.version>1.0.0</dependency.opencmis.version> | ||||||
|         <dependency.webscripts.version>8.28</dependency.webscripts.version> |         <dependency.webscripts.version>8.31</dependency.webscripts.version> | ||||||
|         <dependency.bouncycastle.version>1.70</dependency.bouncycastle.version> |         <dependency.bouncycastle.version>1.70</dependency.bouncycastle.version> | ||||||
|         <dependency.mockito-core.version>3.11.2</dependency.mockito-core.version> |         <dependency.mockito-core.version>3.11.2</dependency.mockito-core.version> | ||||||
|         <dependency.org-json.version>20211205</dependency.org-json.version> |         <dependency.org-json.version>20211205</dependency.org-json.version> | ||||||
|         <dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version> |         <dependency.commons-dbcp.version>2.9.0</dependency.commons-dbcp.version> | ||||||
|         <dependency.commons-io.version>2.11.0</dependency.commons-io.version> |         <dependency.commons-io.version>2.11.0</dependency.commons-io.version> | ||||||
|         <dependency.gson.version>2.8.5</dependency.gson.version> |         <dependency.gson.version>2.8.9</dependency.gson.version> | ||||||
|         <dependency.httpclient.version>4.5.13</dependency.httpclient.version> |         <dependency.httpclient.version>4.5.13</dependency.httpclient.version> | ||||||
|         <dependency.httpcore.version>4.4.15</dependency.httpcore.version> |         <dependency.httpcore.version>4.4.15</dependency.httpcore.version> | ||||||
|         <dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version> |         <dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version> | ||||||
| @@ -107,7 +107,7 @@ | |||||||
|  |  | ||||||
|         <alfresco.googledrive.version>3.2.1.3</alfresco.googledrive.version> |         <alfresco.googledrive.version>3.2.1.3</alfresco.googledrive.version> | ||||||
|         <alfresco.aos-module.version>1.4.1</alfresco.aos-module.version>  |         <alfresco.aos-module.version>1.4.1</alfresco.aos-module.version>  | ||||||
|         <alfresco.api-explorer.version>7.2.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share --> |         <alfresco.api-explorer.version>7.2.1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share --> | ||||||
|  |  | ||||||
|         <alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version> |         <alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version> | ||||||
|         <license-maven-plugin.version>2.0.1.alfresco-2</license-maven-plugin.version> |         <license-maven-plugin.version>2.0.1.alfresco-2</license-maven-plugin.version> | ||||||
| @@ -146,7 +146,7 @@ | |||||||
|         <connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection> |         <connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection> | ||||||
|         <developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection> |         <developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection> | ||||||
|         <url>https://github.com/Alfresco/alfresco-community-repo</url> |         <url>https://github.com/Alfresco/alfresco-community-repo</url> | ||||||
|         <tag>HEAD</tag> |         <tag>15.9</tag> | ||||||
|     </scm> |     </scm> | ||||||
|  |  | ||||||
|     <distributionManagement> |     <distributionManagement> | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo</artifactId> |         <artifactId>alfresco-community-repo</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
|   | |||||||
| @@ -512,6 +512,8 @@ public class ProcessesImpl extends WorkflowRestImpl implements Processes | |||||||
|             throw new InvalidArgumentException("processId is required to get the process info"); |             throw new InvalidArgumentException("processId is required to get the process info"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         validateIfUserAllowedToWorkWithProcess(processId); | ||||||
|  |  | ||||||
|         HistoricProcessInstance processInstance = activitiProcessEngine |         HistoricProcessInstance processInstance = activitiProcessEngine | ||||||
|                 .getHistoryService() |                 .getHistoryService() | ||||||
|                 .createHistoricProcessInstanceQuery() |                 .createHistoricProcessInstanceQuery() | ||||||
|   | |||||||
| @@ -3,6 +3,7 @@ function main() | |||||||
|  |  | ||||||
| // Get the args | // Get the args | ||||||
| var filter = args["filter"]; | var filter = args["filter"]; | ||||||
|  | if (filter!==null && !filter.includes(":")) {filter += " [hint:useCQ]";} | ||||||
| var maxResults = args["maxResults"]; | var maxResults = args["maxResults"]; | ||||||
| var skipCountStr = args["skipCount"]; | var skipCountStr = args["skipCount"]; | ||||||
| var skipCount = skipCountStr != null ? parseInt(skipCountStr) : -1; | var skipCount = skipCountStr != null ? parseInt(skipCountStr) : -1; | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ function main() | |||||||
|    // Get the args |    // Get the args | ||||||
|    var siteShortName = url.templateArgs.shortname, |    var siteShortName = url.templateArgs.shortname, | ||||||
|       site = siteService.getSite(siteShortName), |       site = siteService.getSite(siteShortName), | ||||||
|       filter = (args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "", |       filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]", | ||||||
|       maxResults = (args.maxResults == null) ? 10 : parseInt(args.maxResults, 10), |       maxResults = (args.maxResults == null) ? 10 : parseInt(args.maxResults, 10), | ||||||
|       authorityType = args.authorityType, |       authorityType = args.authorityType, | ||||||
|       zone = args.zone, |       zone = args.zone, | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  * #%L |  * #%L | ||||||
|  * Alfresco Remote API |  * Alfresco Remote API | ||||||
|  * %% |  * %% | ||||||
|  * Copyright (C) 2005 - 2016 Alfresco Software Limited |  * Copyright (C) 2005 - 2022 Alfresco Software Limited | ||||||
|  * %% |  * %% | ||||||
|  * This file is part of the Alfresco software.  |  * This file is part of the Alfresco software.  | ||||||
|  * If the software was purchased under a paid Alfresco license, the terms of  |  * If the software was purchased under a paid Alfresco license, the terms of  | ||||||
| @@ -52,7 +52,6 @@ import org.alfresco.service.namespace.QName; | |||||||
| import org.alfresco.service.transaction.TransactionService; | import org.alfresco.service.transaction.TransactionService; | ||||||
| import org.alfresco.util.GUID; | import org.alfresco.util.GUID; | ||||||
| import org.alfresco.util.PropertyMap; | import org.alfresco.util.PropertyMap; | ||||||
| import org.alfresco.util.testing.category.LuceneTests; |  | ||||||
| import org.apache.commons.lang3.RandomStringUtils; | import org.apache.commons.lang3.RandomStringUtils; | ||||||
| import org.json.JSONArray; | import org.json.JSONArray; | ||||||
| import org.json.JSONObject; | import org.json.JSONObject; | ||||||
| @@ -86,7 +85,6 @@ import static org.mockito.Mockito.when; | |||||||
|  *  |  *  | ||||||
|  * @author Glen Johnson |  * @author Glen Johnson | ||||||
|  */ |  */ | ||||||
| @Category(LuceneTests.class) |  | ||||||
| public class PersonServiceTest extends BaseWebScriptTest | public class PersonServiceTest extends BaseWebScriptTest | ||||||
| {     | {     | ||||||
|     private MutableAuthenticationService authenticationService; |     private MutableAuthenticationService authenticationService; | ||||||
| @@ -340,7 +338,7 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|  |  | ||||||
|         // Ensure that the REST call with no filter will always be routed to a DB canned query rather than a FTS |         // Ensure that the REST call with no filter will always be routed to a DB canned query rather than a FTS | ||||||
|         // (see ALF-18876 for details) |         // (see ALF-18876 for details) | ||||||
|         String filter = "*%20[hint:useCQ]"; |         String filter = "*"; | ||||||
|  |  | ||||||
|         Response response = sendRequest(new GetRequest(URL_PEOPLE + "?filter=" + filter), 200); |         Response response = sendRequest(new GetRequest(URL_PEOPLE + "?filter=" + filter), 200); | ||||||
|         JSONObject res = new JSONObject(response.getContentAsString()); |         JSONObject res = new JSONObject(response.getContentAsString()); | ||||||
| @@ -386,7 +384,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&startIndex=" + 0 + |                         "&startIndex=" + 0 + | ||||||
|                         "&pageSize=" + 6 |                         "&pageSize=" + 6 | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         JSONObject res = new JSONObject(response.getContentAsString()); |         JSONObject res = new JSONObject(response.getContentAsString()); | ||||||
|         JSONArray peopleAsc = res.getJSONArray("people"); |         JSONArray peopleAsc = res.getJSONArray("people"); | ||||||
|         assertEquals("The number of returned results is not correct.", 6, peopleAsc.length()); |         assertEquals("The number of returned results is not correct.", 6, peopleAsc.length()); | ||||||
| @@ -398,7 +395,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&startIndex=" + 0 + |                         "&startIndex=" + 0 + | ||||||
|                         "&pageSize=" + 2 |                         "&pageSize=" + 2 | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         res = new JSONObject(response.getContentAsString()); |         res = new JSONObject(response.getContentAsString()); | ||||||
|         peopleAsc = res.getJSONArray("people"); |         peopleAsc = res.getJSONArray("people"); | ||||||
|         assertEquals("The number of returned results is not correct.", 2, peopleAsc.length()); |         assertEquals("The number of returned results is not correct.", 2, peopleAsc.length()); | ||||||
| @@ -416,7 +412,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&startIndex=" + 2 + |                         "&startIndex=" + 2 + | ||||||
|                         "&pageSize=" + 2 |                         "&pageSize=" + 2 | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         res = new JSONObject(response.getContentAsString()); |         res = new JSONObject(response.getContentAsString()); | ||||||
|         peopleAsc = res.getJSONArray("people"); |         peopleAsc = res.getJSONArray("people"); | ||||||
|         assertEquals("The number of returned results is not correct.", 2, peopleAsc.length()); |         assertEquals("The number of returned results is not correct.", 2, peopleAsc.length()); | ||||||
| @@ -434,7 +429,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&startIndex=" + 4 + |                         "&startIndex=" + 4 + | ||||||
|                         "&pageSize=" + 2 |                         "&pageSize=" + 2 | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         res = new JSONObject(response.getContentAsString()); |         res = new JSONObject(response.getContentAsString()); | ||||||
|         peopleAsc = res.getJSONArray("people"); |         peopleAsc = res.getJSONArray("people"); | ||||||
|         assertEquals("The number of returned results is not correct.", 2, peopleAsc.length()); |         assertEquals("The number of returned results is not correct.", 2, peopleAsc.length()); | ||||||
| @@ -452,7 +446,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&startIndex=" + 3 + |                         "&startIndex=" + 3 + | ||||||
|                         "&pageSize=" + 5 |                         "&pageSize=" + 5 | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         res = new JSONObject(response.getContentAsString()); |         res = new JSONObject(response.getContentAsString()); | ||||||
|         peopleAsc = res.getJSONArray("people"); |         peopleAsc = res.getJSONArray("people"); | ||||||
|         assertEquals("The number of returned results is not correct.", 3, peopleAsc.length()); |         assertEquals("The number of returned results is not correct.", 3, peopleAsc.length()); | ||||||
| @@ -476,6 +469,7 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|     public void testGetPeopleSorting() throws Exception |     public void testGetPeopleSorting() throws Exception | ||||||
|     { |     { | ||||||
|         String filter = GUID.generate(); |         String filter = GUID.generate(); | ||||||
|  |         String filterByJob = "jobtitle:job"; | ||||||
|         String usernameA = filter + "-aaa-"; |         String usernameA = filter + "-aaa-"; | ||||||
|         String usernameB = filter + "-BBB-"; |         String usernameB = filter + "-BBB-"; | ||||||
|         String usernameC = filter + "-ccc-"; |         String usernameC = filter + "-ccc-"; | ||||||
| @@ -496,12 +490,17 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|         addUserUsageContent(usernameD, 50); |         addUserUsageContent(usernameD, 50); | ||||||
|         userUsageTrackingComponent.execute(); |         userUsageTrackingComponent.execute(); | ||||||
|  |  | ||||||
|  |         //check sorting for CQ | ||||||
|         checkSorting(filter, SORT_BY_USERNAME, usernameA, usernameB, usernameC, usernameD); |         checkSorting(filter, SORT_BY_USERNAME, usernameA, usernameB, usernameC, usernameD); | ||||||
|         checkSorting(filter, SORT_BY_FULLNAME, usernameA, usernameB, usernameC, usernameD); |         checkSorting(filter, SORT_BY_FULLNAME, usernameA, usernameB, usernameC, usernameD); | ||||||
|         checkSorting(filter, SORT_BY_JOBTITLE, usernameA, usernameB, usernameC, usernameD); |  | ||||||
|         checkSorting(filter, SORT_BY_EMAIL, usernameA, usernameB, usernameC, usernameD); |         //since CQ search only sorts by fullname and username test the other sorts by filtering for a job which bypasses CQ (MNT 22905) | ||||||
|         checkSorting(filter, SORT_BY_QUOTA, usernameA, usernameB, usernameC, usernameD); |         checkSorting(filterByJob, SORT_BY_USERNAME, usernameA, usernameB, usernameC, usernameD); | ||||||
|         checkSorting(filter, SORT_BY_USAGE, usernameA, usernameB, usernameC, usernameD); |         checkSorting(filterByJob, SORT_BY_FULLNAME, usernameA, usernameB, usernameC, usernameD); | ||||||
|  |         checkSorting(filterByJob, SORT_BY_JOBTITLE, usernameA, usernameB, usernameC, usernameD); | ||||||
|  |         checkSorting(filterByJob, SORT_BY_EMAIL, usernameA, usernameB, usernameC, usernameD); | ||||||
|  |         checkSorting(filterByJob, SORT_BY_QUOTA, usernameA, usernameB, usernameC, usernameD); | ||||||
|  |         checkSorting(filterByJob, SORT_BY_USAGE, usernameA, usernameB, usernameC, usernameD); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private void checkSorting(String filter, String sortBy, String... usernames) throws Exception |     private void checkSorting(String filter, String sortBy, String... usernames) throws Exception | ||||||
| @@ -519,7 +518,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&filter=" + filter + |                         "&filter=" + filter + | ||||||
|                         "&dir=" + ASC_DIR |                         "&dir=" + ASC_DIR | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         JSONObject res = new JSONObject(response.getContentAsString()); |         JSONObject res = new JSONObject(response.getContentAsString()); | ||||||
|         JSONArray peopleAsc = res.getJSONArray("people"); |         JSONArray peopleAsc = res.getJSONArray("people"); | ||||||
|         assertEquals(usernames.length, peopleAsc.length()); |         assertEquals(usernames.length, peopleAsc.length()); | ||||||
| @@ -530,7 +528,6 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "&filter=" + filter + |                         "&filter=" + filter + | ||||||
|                         "&dir=" + DESC_DIR |                         "&dir=" + DESC_DIR | ||||||
|                 ), Status.STATUS_OK); |                 ), Status.STATUS_OK); | ||||||
|         assertSearchQuery(filter, true); |  | ||||||
|         res = new JSONObject(response.getContentAsString()); |         res = new JSONObject(response.getContentAsString()); | ||||||
|         JSONArray peopleDesc = res.getJSONArray("people"); |         JSONArray peopleDesc = res.getJSONArray("people"); | ||||||
|         assertEquals(usernames.length, peopleDesc.length()); |         assertEquals(usernames.length, peopleDesc.length()); | ||||||
| @@ -541,7 +538,11 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|             assertEquals(peopleAsc.getJSONObject(i).getString("userName"), |             assertEquals(peopleAsc.getJSONObject(i).getString("userName"), | ||||||
|                     peopleDesc.getJSONObject(peopleAsc.length() - i - 1).getString("userName")); |                     peopleDesc.getJSONObject(peopleAsc.length() - i - 1).getString("userName")); | ||||||
|         } |         } | ||||||
|  |         assertCorrectSort(sortBy, peopleAsc); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void assertCorrectSort(String sortBy, JSONArray peopleAsc) | ||||||
|  |     { | ||||||
|         // Check Asc sorting for each field |         // Check Asc sorting for each field | ||||||
|         for (int i = 0; i < peopleAsc.length() - 1; i++) |         for (int i = 0; i < peopleAsc.length() - 1; i++) | ||||||
|         { |         { | ||||||
| @@ -766,6 +767,51 @@ public class PersonServiceTest extends BaseWebScriptTest | |||||||
|                         "myJobTitle", "firstName.lastName@email.com", "myBio", "images/avatar.jpg", 0, |                         "myJobTitle", "firstName.lastName@email.com", "myBio", "images/avatar.jpg", 0, | ||||||
|                         Status.STATUS_BAD_REQUEST);         |                         Status.STATUS_BAD_REQUEST);         | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     public void testUserNameCaseSensitivityCQ() throws Exception | ||||||
|  |     { | ||||||
|  |         String upperCaseUserName = "PersonServiceTest.MixedCaseUser"; | ||||||
|  |         String lowerCaseUserName = upperCaseUserName.toLowerCase(); | ||||||
|  |         // Create a new person | ||||||
|  |  | ||||||
|  |         String currentUser = this.authenticationComponent.getCurrentUserName(); | ||||||
|  |         try | ||||||
|  |         { | ||||||
|  |             /** | ||||||
|  |              *  simulate cloud with lower case user names | ||||||
|  |              */ | ||||||
|  |             createPerson(lowerCaseUserName, "myTitle", "myFirstName", "myLastName", "myOrganisation", | ||||||
|  |                     "myJobTitle", "firstName.lastName@email.com", "myBio", "images/avatar.jpg", 0, | ||||||
|  |                     Status.STATUS_OK); | ||||||
|  |  | ||||||
|  |             String adminUser = this.authenticationComponent.getSystemUserName(); | ||||||
|  |             this.authenticationComponent.setCurrentUser(adminUser); | ||||||
|  |             personService.setCreateMissingPeople(false); | ||||||
|  |  | ||||||
|  |             //try with canned query | ||||||
|  |             String filter = "PerSOnSerVIceTest.MixEDCasEUseR"; | ||||||
|  |             assertPersonIsFound(filter); | ||||||
|  |  | ||||||
|  |             filter = "MyFiRsTnAmE"; | ||||||
|  |             assertPersonIsFound(filter); | ||||||
|  |  | ||||||
|  |             filter = "MyLaStNaMe"; | ||||||
|  |             assertPersonIsFound(filter); | ||||||
|  |         } | ||||||
|  |         finally | ||||||
|  |         { | ||||||
|  |             this.authenticationComponent.setCurrentUser(currentUser); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void assertPersonIsFound(String filter) throws Exception | ||||||
|  |     { | ||||||
|  |         Response response = sendRequest(new GetRequest(URL_PEOPLE + "?filter=" + filter), 200); | ||||||
|  |         JSONObject res = new JSONObject(response.getContentAsString()); | ||||||
|  |         int peopleFound = res.getJSONArray("people").length(); | ||||||
|  |         assertTrue("No people found", peopleFound > 0); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      *  |      *  | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo</artifactId> |         <artifactId>alfresco-community-repo</artifactId> | ||||||
|         <version>14.146-SNAPSHOT</version> |         <version>15.9</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
| @@ -236,7 +236,7 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.freemarker</groupId> |             <groupId>org.freemarker</groupId> | ||||||
|             <artifactId>freemarker</artifactId> |             <artifactId>freemarker</artifactId> | ||||||
|             <version>2.3.20-alfresco-patched-20200421</version> |             <version>2.3.20-alfresco-patched-20220413</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.apache.xmlbeans</groupId> |             <groupId>org.apache.xmlbeans</groupId> | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
| repository.name=Main Repository | repository.name=Main Repository | ||||||
|  |  | ||||||
| # Schema number | # Schema number | ||||||
| version.schema=16000 | version.schema=16100 | ||||||
|  |  | ||||||
| # Directory configuration | # Directory configuration | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user