mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			266 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | fd0d5204eb | ||
|  | f9b8a4b42d | ||
|  | fcdc1438e7 | ||
|  | 7cd1416561 | ||
|  | f197757f94 | ||
|  | af995f1087 | ||
|  | 2cfcd3dfa7 | ||
|  | 89e09b0162 | ||
|  | 495808b172 | ||
|  | 57060af84b | ||
|  | 60261aafd1 | ||
|  | 8dad225394 | ||
|  | 5cc21c55e7 | ||
|  | c71aaf7537 | ||
|  | b7d16ac915 | ||
|  | 1a436b06e4 | ||
|  | be02be5a8b | ||
|  | a674e574c5 | ||
|  | aacaa62ff9 | ||
|  | 371bd1543d | ||
|  | 4cb16f046f | ||
|  | 2fb7de9ace | ||
|  | ed972c79d7 | ||
|  | 0f3e2dc4cc | ||
|  | 4e7d0ccae3 | ||
|  | 1b5636a339 | ||
|  | 164ce720af | ||
|  | 258738e3dd | ||
|  | fefd937c89 | ||
|  | 91f9467a99 | ||
|  | 97b1515f7c | ||
|  | 7f235f1e2b | ||
|  | 109bdeee0f | ||
|  | 7c97f49574 | ||
|  | 2088b8b553 | ||
|  | 280a873cb6 | ||
|  | 9683c18448 | ||
|  | 21b36a7100 | ||
|  | 96481daae1 | ||
|  | 7ef573699b | ||
|  | a000df7ceb | ||
|  | 4a22735120 | ||
|  | 94d84799be | ||
|  | 754776e30c | ||
|  | 28b8bb85e4 | ||
|  | 4910028d51 | ||
|  | 75d0825295 | ||
|  | 964cedaebd | ||
|  | 2bda7d7231 | ||
|  | 82d316d802 | ||
|  | 1840d1056d | ||
|  | 334e8c84df | ||
|  | 24309cf4b6 | ||
|  | 2d28742a94 | ||
|  | d6503ac1de | ||
|  | 73ef1ed9ff | ||
|  | d3bc9e2b60 | ||
|  | 174186d1ff | ||
|  | 57331afe8f | ||
|  | 7c87595b0c | ||
|  | b7191b175e | ||
|  | 39b19d1ceb | ||
|  | 9e23b99078 | ||
|  | ac36ac07e8 | ||
|  | cc10339577 | ||
|  | 8aa975fbc3 | ||
|  | 01620b75ff | ||
|  | 9327218f17 | ||
|  | b57373fbe3 | ||
|  | 613fb458b9 | ||
|  | 31cd97b9d2 | ||
|  | 255fe46c8e | ||
|  | 88d32748b1 | ||
|  | 90e1522a56 | ||
|  | 7e61befc21 | ||
|  | be6dc14330 | ||
|  | ab4bc1af9f | ||
|  | eaec23ae7a | ||
|  | 8ff727c95d | ||
|  | 48475fdfaa | ||
|  | 812959be2e | ||
|  | 5b8c52db67 | ||
|  | 20c42b6561 | ||
|  | 52dfea9b21 | ||
|  | d04dada44e | ||
|  | 2e85de7c81 | ||
|  | 42324368e5 | ||
|  | 8d885220d8 | ||
|  | 6367f5304d | ||
|  | f17b309c27 | ||
|  | bb2cc1765d | ||
|  | d20e8ee158 | ||
|  | 254193f9aa | ||
|  | 4293f21618 | ||
|  | e0eb43c479 | ||
|  | f1bbb6cce7 | ||
|  | e6e2a2d8ac | ||
|  | c2cfcdc35a | ||
|  | 6b2ac86b1d | ||
|  | 8b212dc4cf | ||
|  | e2c357c1e0 | ||
|  | 4a024e510d | ||
|  | 3f75c9b15f | ||
|  | 96f94a98be | ||
|  | bfc0445aeb | ||
|  | 977f6f12d4 | ||
|  | 626640ddc7 | ||
|  | 2b00e550a9 | ||
|  | f3dca482ff | ||
|  | 94e957cb73 | ||
|  | 8868e64a6a | ||
|  | f4af65943f | ||
|  | 6fe1b50741 | ||
|  | f300bd6b3a | ||
|  | f7195ef16a | ||
|  | ef228f0614 | ||
|  | 6c0f231316 | ||
|  | 33b521b421 | ||
|  | eff4e0738c | ||
|  | 5685fc3b17 | ||
|  | 7c22a2598b | ||
|  | efe053167d | ||
|  | 4aae383637 | ||
|  | ca1774ffae | ||
|  | 6206f67bdd | ||
|  | 82897f449f | ||
|  | e6d30cddac | ||
|  | 0e6b444a25 | ||
|  | 61dc54bb33 | ||
|  | a6c7f044df | ||
|  | 18016df074 | ||
|  | b021c1ebfe | ||
|  | e3e42137d9 | ||
|  | 9327814266 | ||
|  | d45fd10431 | ||
|  | 09242daaec | ||
|  | 491a41e8ba | ||
|  | 1dac1e5fdb | ||
|  | 2c9d8e63ea | ||
|  | a3998de1ba | ||
|  | 582742bbd3 | ||
|  | ebe29717fa | ||
|  | c6a654cbcf | ||
|  | cd947b5581 | ||
|  | ef4dd74580 | ||
|  | 7edbdd72f2 | ||
|  | b7978c2a62 | ||
|  | c1d9142a9c | ||
|  | 03a5a3cd3a | ||
|  | c1ac217c44 | ||
|  | 1b04fef8cd | ||
|  | 31bb692b16 | ||
|  | 3222f13efe | ||
|  | d66ed689a0 | ||
|  | f84a7035d7 | ||
|  | 56177b6790 | ||
|  | 3c32899f6e | ||
|  | d3512dd8e4 | ||
|  | d8273b19cf | ||
|  | 8abea08762 | ||
|  | 42e3ead101 | ||
|  | b1c095b51e | ||
|  | ab85ea8ffe | ||
|  | 9a794cfe97 | ||
|  | 8e3f610f8a | ||
|  | 8c9edde95f | ||
|  | 5652317a0a | ||
|  | b8a9a9588c | ||
|  | a48cf7eed3 | ||
|  | 73f6c7a8f7 | ||
|  | 37aaa0d147 | ||
|  | 5d5d1d8680 | ||
|  | 120d4acdb0 | ||
|  | fa3acb47a9 | ||
|  | 716b039c07 | ||
|  | abec95881e | ||
|  | 58164d59bf | ||
|  | 8e80b87439 | ||
|  | 4e3591cc72 | ||
|  | 6aa4c37825 | ||
|  | 68dae275a5 | ||
|  | 536f8c609c | ||
|  | 6686863352 | ||
|  | 3774a0e504 | ||
|  | 4bf569d297 | ||
|  | 13bcfe4125 | ||
|  | 982e0d24f5 | ||
|  | c2fbf53b03 | ||
|  | f8b5e9cb03 | ||
|  | ea0b37022b | ||
|  | f20a9b441d | ||
|  | 7c3a9113a0 | ||
|  | 66d9beef14 | ||
|  | 4a97305505 | ||
|  | 9b4593e4b3 | ||
|  | 01a2a23c4a | ||
|  | 2c2b51f47e | ||
|  | 1e37b3308d | ||
|  | 84a36d68d4 | ||
|  | 40d475abf9 | ||
|  | 5d3f1f2402 | ||
|  | 2cd29d87ec | ||
|  | 8f1631fb55 | ||
|  | 5f6dced886 | ||
|  | 25fdc9ccc7 | ||
|  | b6456cde34 | ||
|  | 27b80d8adb | ||
|  | 536e12ff76 | ||
|  | 96ab699ea8 | ||
|  | 9630d4cb02 | ||
|  | fe9175d959 | ||
|  | 277d10133d | ||
|  | 3fb964a460 | ||
|  | d630dcb7af | ||
|  | 7a673966aa | ||
|  | 65d2863b9d | ||
|  | 56ef484ae0 | ||
|  | d619d5365e | ||
|  | 7096276b02 | ||
|  | c9a46e1a8a | ||
|  | 98f9175a13 | ||
|  | 4e89b0a033 | ||
|  | c6c0779984 | ||
|  | 554b26e7e7 | ||
|  | 93d704d44c | ||
|  | 0916efad7c | ||
|  | 6169ec0095 | ||
|  | 75ace2a268 | ||
|  | f489c4193b | ||
|  | 71c3addf2d | ||
|  | cc43f9338e | ||
|  | 45ad5045b1 | ||
|  | 773f99453e | ||
|  | 538d269f66 | ||
|  | 1dbf1c1314 | ||
|  | 3969cd8f14 | ||
|  | eaa11fcb34 | ||
|  | cd5c2227e2 | ||
|  | 757b26b1b8 | ||
|  | 0366449457 | ||
|  | 6827b2c7a1 | ||
|  | 36bc1dc1a4 | ||
|  | 8407159a17 | ||
|  | 917dd35c27 | ||
|  | 6e815ebd34 | ||
|  | ad0668cce3 | ||
|  | 11fd7ca1dd | ||
|  | 6be0c3031f | ||
|  | a1d869bdef | ||
|  | d130c12f2a | ||
|  | 24e987e735 | ||
|  | 63e7492823 | ||
|  | 545a957a1b | ||
|  | 325e980cf0 | ||
|  | e2a4dcc6ad | ||
|  | a993c9ed97 | ||
|  | 85d2a5176b | ||
|  | 3c245ae64c | ||
|  | fbf5966d10 | ||
|  | 8fca14df40 | ||
|  | e38e7b4bda | ||
|  | b378de58d8 | ||
|  | 8a64d9fb0b | ||
|  | 3c092b696d | ||
|  | 6f222106c5 | ||
|  | bd5a016382 | 
							
								
								
									
										793
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										793
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										20
									
								
								.github/workflows/master_release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/master_release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -31,15 +31,15 @@ jobs: | |||||||
|       !contains(github.event.head_commit.message, '[no release]') && |       !contains(github.event.head_commit.message, '[no release]') && | ||||||
|       github.event_name != 'pull_request' |       github.event_name != 'pull_request' | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v5 | ||||||
|         with: |         with: | ||||||
|           persist-credentials: false |           persist-credentials: false | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||||
|       - name: "Init" |       - name: "Init" | ||||||
|         run: bash ./scripts/ci/init.sh |         run: bash ./scripts/ci/init.sh | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1 | ||||||
|         with: |         with: | ||||||
|           username: ${{ env.GIT_USERNAME }} |           username: ${{ env.GIT_USERNAME }} | ||||||
|           email: ${{ env.GIT_EMAIL }} |           email: ${{ env.GIT_EMAIL }} | ||||||
| @@ -60,15 +60,15 @@ jobs: | |||||||
|       !contains(github.event.head_commit.message, '[no downstream]') && |       !contains(github.event.head_commit.message, '[no downstream]') && | ||||||
|       github.event_name != 'pull_request' |       github.event_name != 'pull_request' | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v5 | ||||||
|         with: |         with: | ||||||
|           persist-credentials: false |           persist-credentials: false | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.24.1 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v8.24.1 | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.24.1 | ||||||
|       - name: "Init" |       - name: "Init" | ||||||
|         run: bash ./scripts/ci/init.sh |         run: bash ./scripts/ci/init.sh | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v8.24.1 | ||||||
|         with: |         with: | ||||||
|           username: ${{ env.GIT_USERNAME }} |           username: ${{ env.GIT_USERNAME }} | ||||||
|           email: ${{ env.GIT_EMAIL }} |           email: ${{ env.GIT_EMAIL }} | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								.github/workflows/precommit_formatter.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/precommit_formatter.yml
									
									
									
									
										vendored
									
									
								
							| @@ -11,9 +11,9 @@ jobs: | |||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     if: contains(github.event.head_commit.message, '[reformat code]') |     if: contains(github.event.head_commit.message, '[reformat code]') | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v4 |       - uses: actions/checkout@v5 | ||||||
|       - name: Set up Python ${{ inputs.python-version }} |       - name: Set up Python ${{ inputs.python-version }} | ||||||
|         uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 |         uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||||||
|         with: |         with: | ||||||
|           python-version: "3.9" |           python-version: "3.9" | ||||||
|       - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 |       - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | ||||||
| @@ -22,7 +22,7 @@ jobs: | |||||||
|           extra_args: --all-files |           extra_args: --all-files | ||||||
|       - name: Update secrets baseline |       - name: Update secrets baseline | ||||||
|         run: pip install detect-secrets && detect-secrets scan --baseline .secrets.baseline |         run: pip install detect-secrets && detect-secrets scan --baseline .secrets.baseline | ||||||
|       - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.16.0 |       - uses: Alfresco/alfresco-build-tools/.github/actions/git-commit-changes@v8.24.1 | ||||||
|         with: |         with: | ||||||
|           username: ${{ secrets.BOT_GITHUB_USERNAME }} |           username: ${{ secrets.BOT_GITHUB_USERNAME }} | ||||||
|           add-options: -u |           add-options: -u | ||||||
|   | |||||||
| @@ -127,29 +127,6 @@ | |||||||
|     } |     } | ||||||
|   ], |   ], | ||||||
|   "results": { |   "results": { | ||||||
|     ".github/workflows/ci.yml": [ |  | ||||||
|       { |  | ||||||
|         "type": "Secret Keyword", |  | ||||||
|         "filename": ".github/workflows/ci.yml", |  | ||||||
|         "hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572", |  | ||||||
|         "is_verified": false, |  | ||||||
|         "line_number": 295 |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         "type": "Secret Keyword", |  | ||||||
|         "filename": ".github/workflows/ci.yml", |  | ||||||
|         "hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966", |  | ||||||
|         "is_verified": false, |  | ||||||
|         "line_number": 370 |  | ||||||
|       }, |  | ||||||
|       { |  | ||||||
|         "type": "Secret Keyword", |  | ||||||
|         "filename": ".github/workflows/ci.yml", |  | ||||||
|         "hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39", |  | ||||||
|         "is_verified": false, |  | ||||||
|         "line_number": 904 |  | ||||||
|       } |  | ||||||
|     ], |  | ||||||
|     ".github/workflows/master_release.yml": [ |     ".github/workflows/master_release.yml": [ | ||||||
|       { |       { | ||||||
|         "type": "Secret Keyword", |         "type": "Secret Keyword", | ||||||
| @@ -1265,7 +1242,7 @@ | |||||||
|         "filename": "repository/src/main/resources/alfresco/repository.properties", |         "filename": "repository/src/main/resources/alfresco/repository.properties", | ||||||
|         "hashed_secret": "1459a56410378e4d3ab470eff570e5eae1742762", |         "hashed_secret": "1459a56410378e4d3ab470eff570e5eae1742762", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 312, |         "line_number": 314, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
| @@ -1273,7 +1250,7 @@ | |||||||
|         "filename": "repository/src/main/resources/alfresco/repository.properties", |         "filename": "repository/src/main/resources/alfresco/repository.properties", | ||||||
|         "hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d", |         "hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d", | ||||||
|         "is_verified": false, |         "is_verified": false, | ||||||
|         "line_number": 771, |         "line_number": 773, | ||||||
|         "is_secret": false |         "is_secret": false | ||||||
|       } |       } | ||||||
|     ], |     ], | ||||||
| @@ -1868,5 +1845,5 @@ | |||||||
|       } |       } | ||||||
|     ] |     ] | ||||||
|   }, |   }, | ||||||
|   "generated_at": "2025-04-22T06:32:47Z" |   "generated_at": "2025-07-23T08:25:11Z" | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |       <version>25.3.0.57</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>25.2.0.43</version> |       <version>25.3.0.57</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>25.2.0.43</version> |       <version>25.3.0.57</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <build> |    <build> | ||||||
| @@ -74,16 +74,6 @@ | |||||||
|          <artifactId>alfresco-testng</artifactId> |          <artifactId>alfresco-testng</artifactId> | ||||||
|          <version>1.1</version> |          <version>1.1</version> | ||||||
|       </dependency> |       </dependency> | ||||||
|       <dependency> |  | ||||||
|          <groupId>com.epam.reportportal</groupId> |  | ||||||
|          <artifactId>agent-java-testng</artifactId> |  | ||||||
|          <scope>test</scope> |  | ||||||
|       </dependency> |  | ||||||
|       <dependency> |  | ||||||
|          <groupId>com.squareup.okhttp3</groupId> |  | ||||||
|          <artifactId>okhttp</artifactId> |  | ||||||
|          <scope>test</scope> |  | ||||||
|       </dependency> |  | ||||||
|       <dependency> |       <dependency> | ||||||
|          <groupId>org.awaitility</groupId> |          <groupId>org.awaitility</groupId> | ||||||
|          <artifactId>awaitility</artifactId> |          <artifactId>awaitility</artifactId> | ||||||
| @@ -93,7 +83,7 @@ | |||||||
|       <dependency> |       <dependency> | ||||||
|          <groupId>org.apache.commons</groupId> |          <groupId>org.apache.commons</groupId> | ||||||
|          <artifactId>commons-collections4</artifactId> |          <artifactId>commons-collections4</artifactId> | ||||||
|          <version>4.4</version> |          <version>4.5.0</version> | ||||||
|       </dependency> |       </dependency> | ||||||
|       <dependency> |       <dependency> | ||||||
|          <groupId>com.github.docker-java</groupId> |          <groupId>com.github.docker-java</groupId> | ||||||
|   | |||||||
| @@ -43,7 +43,7 @@ import com.github.dockerjava.core.command.LogContainerResultCallback; | |||||||
| import com.github.dockerjava.netty.NettyDockerCmdExecFactory; | import com.github.dockerjava.netty.NettyDockerCmdExecFactory; | ||||||
| import lombok.Getter; | import lombok.Getter; | ||||||
| import lombok.Setter; | import lombok.Setter; | ||||||
| import org.apache.commons.lang.SystemUtils; | import org.apache.commons.lang3.SystemUtils; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPr | |||||||
|  |  | ||||||
| import java.util.Collections; | import java.util.Collections; | ||||||
|  |  | ||||||
| import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||||
| import org.json.JSONObject; | import org.json.JSONObject; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
| import org.testng.annotations.Test; | import org.testng.annotations.Test; | ||||||
|   | |||||||
| @@ -45,7 +45,7 @@ import java.time.Instant; | |||||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||||
| import org.apache.http.HttpEntity; | import org.apache.http.HttpEntity; | ||||||
| import org.apache.http.HttpResponse; | import org.apache.http.HttpResponse; | ||||||
| import org.apache.http.HttpStatus; | import org.apache.http.HttpStatus; | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -23,7 +23,7 @@ Recorded content can be explicitly destroyed whilst maintaining the original nod | |||||||
| * License: Alfresco Community | * License: Alfresco Community | ||||||
| * Issue Tracker Link: [JIRA RM](https://issues.alfresco.com/jira/projects/RM/summary) | * Issue Tracker Link: [JIRA RM](https://issues.alfresco.com/jira/projects/RM/summary) | ||||||
| * Contribution Model: Alfresco Closed Source | * Contribution Model: Alfresco Closed Source | ||||||
| * Documentation: [docs.alfresco.com (Records Management)](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition/Introduction) | * Documentation: [docs.alfresco.com (Records Management)](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1&component=Alfresco%20Governance%20Services%20Community%20Edition) | ||||||
|  |  | ||||||
| ***  | ***  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,18 +21,18 @@ RM is split into two main parts - a repository integration and a Share integrati | |||||||
| * [Community License](../LICENSE.txt) | * [Community License](../LICENSE.txt) | ||||||
| * [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository) | * [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository) | ||||||
| * [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM) | * [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM) | ||||||
| * [Community Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition/Introduction) | * [Community Documentation Link](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1&component=Alfresco%20Governance%20Services%20Community%20Edition) | ||||||
| * [Enterprise Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services/23.4/Alfresco-Governance-Services/Introduction) | * [Enterprise Documentation Link](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1) | ||||||
| * [Contribution Model](../../CONTRIBUTING.md) | * [Contribution Model](../../CONTRIBUTING.md) | ||||||
|  |  | ||||||
| ***  | ***  | ||||||
|  |  | ||||||
| ### Prerequisite Knowledge | ### Prerequisite Knowledge | ||||||
| An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services-Community-Edition/23.4/Alfresco-Content-Services-Community-Edition/Develop) give useful background information: | An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](https://support.hyland.com/access?dita:id=lsl1724405261585&vrm_version=25.2&component=Alfresco%20Content%20Services%20Community%20Edition) give useful background information: | ||||||
|  |  | ||||||
| * [ACS Architecture](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Software-Architecture) | * [ACS Architecture](https://support.hyland.com/access?dita:id=lfo1719554691023&vrm_version=25.2) | ||||||
| * [Platform Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Extension-Points-Overview) | * [Platform Extensions](https://support.hyland.com/access?dita:id=ifr1720080387005&vrm_version=25.2) | ||||||
| * [Share Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Share-UI-Extension-Points) | * [Share Extensions](https://support.hyland.com/access?dita:id=wqu1720687386891&vrm_version=25.2) | ||||||
|  |  | ||||||
| ***  | ***  | ||||||
|  |  | ||||||
| @@ -44,12 +44,12 @@ The RM Share module communicates with the repository module via REST APIs. Inter | |||||||
| * A DAO layer responsible for CRUD operations against the database. | * A DAO layer responsible for CRUD operations against the database. | ||||||
|  |  | ||||||
| #### REST API | #### REST API | ||||||
| The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Web-Scripts) is older and not recommended for integrations. The [v1 API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/REST-API-Guide) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/). | The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](https://support.hyland.com/access?dita:id=fga1720080409048&vrm_version=25.2) is older and not recommended for integrations. The [v1 API](https://support.hyland.com/access?dita:id=cmm1721136574006&vrm_version=25.2) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/). | ||||||
|  |  | ||||||
| Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming. | Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming. | ||||||
|  |  | ||||||
| #### Java Public API | #### Java Public API | ||||||
| The Java service layer is fronted by a [Java Public API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Reference/Java-Foundation-API), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method.  The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`. | The Java service layer is fronted by a [Java Public API](https://support.hyland.com/access?dita:id=lol1721390191517&vrm_version=25.2), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method.  The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`. | ||||||
|  |  | ||||||
| Each Java service will have at least four beans defined for it: | Each Java service will have at least four beans defined for it: | ||||||
|  |  | ||||||
| @@ -61,7 +61,7 @@ Each Java service will have at least four beans defined for it: | |||||||
| #### DAOs | #### DAOs | ||||||
| The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations. | The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations. | ||||||
|  |  | ||||||
| We use standard Alfresco [data modelling](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Content-Model-Extension-Point) to store RM metadata. We extend the [Alfresco patching mechanism](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Patches) to provide community and enterprise schema upgrades. | We use standard Alfresco [data modelling](https://support.hyland.com/access?dita:id=ekx1720080373621&vrm_version=25.2) to store RM metadata. We extend the [Alfresco patching mechanism](https://support.hyland.com/access?dita:id=ato1720080396825&vrm_version=25.2) to provide community and enterprise schema upgrades. | ||||||
|  |  | ||||||
| *** | *** | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |       <version>25.3.0.57</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <modules> |    <modules> | ||||||
|   | |||||||
| @@ -1,3 +1,3 @@ | |||||||
| SOLR6_TAG=2.0.15 | SOLR6_TAG=2.0.16 | ||||||
| POSTGRES_TAG=16.6 | POSTGRES_TAG=16.6 | ||||||
| ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8 | ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8 | ||||||
|   | |||||||
| @@ -119,6 +119,11 @@ rm.patch.v35.holdNewChildAssocPatch.batchSize=1000 | |||||||
| rm.haspermissionmap.read=Read | rm.haspermissionmap.read=Read | ||||||
| rm.haspermissionmap.write=WriteProperties,AddChildren,ReadContent | rm.haspermissionmap.write=WriteProperties,AddChildren,ReadContent | ||||||
|  |  | ||||||
|  | # Extended Permissions | ||||||
|  | # Enable matching the given username with the correct casing username when retrieving an IPR group. | ||||||
|  | # Only needs to be used if there are owners that don't have the username in the correct casing. | ||||||
|  | rm.extendedSecurity.enableUsernameNormalization=false | ||||||
|  |  | ||||||
| # | # | ||||||
| # Extended auto-version behaviour.  If true and other auto-version properties are satisfied, then | # Extended auto-version behaviour.  If true and other auto-version properties are satisfied, then | ||||||
| # a document will be auto-versioned when its type is changed. | # a document will be auto-versioned when its type is changed. | ||||||
|   | |||||||
| @@ -15,6 +15,13 @@ | |||||||
|       <parameter property="end" jdbcType="BIGINT" javaType="java.lang.Long"/> |       <parameter property="end" jdbcType="BIGINT" javaType="java.lang.Long"/> | ||||||
|    </parameterMap> |    </parameterMap> | ||||||
|  |  | ||||||
|  |    <parameterMap id="parameter_NodeIdsWhichReferenceContentUrl" type="map"> | ||||||
|  |       <parameter property="contentUrlShort" jdbcType="VARCHAR" javaType="java.lang.String"/> | ||||||
|  |       <parameter property="contentUrlCrc" jdbcType="BIGINT" javaType="java.lang.Long"/> | ||||||
|  |       <parameter property="localName" jdbcType="VARCHAR" javaType="java.lang.String"/> | ||||||
|  |       <parameter property="uri" jdbcType="VARCHAR" javaType="java.lang.String"/> | ||||||
|  |    </parameterMap> | ||||||
|  |  | ||||||
|    <resultMap id="result_NodeRefEntity" type="org.alfresco.module.org_alfresco_module_rm.query.NodeRefEntity"> |    <resultMap id="result_NodeRefEntity" type="org.alfresco.module.org_alfresco_module_rm.query.NodeRefEntity"> | ||||||
|       <result property="row" column="row" jdbcType="BIGINT" javaType="java.lang.Long"/> |       <result property="row" column="row" jdbcType="BIGINT" javaType="java.lang.Long"/> | ||||||
|       <result property="protocol" column="protocol" jdbcType="VARCHAR" javaType="java.lang.String"/> |       <result property="protocol" column="protocol" jdbcType="VARCHAR" javaType="java.lang.String"/> | ||||||
| @@ -55,18 +62,21 @@ | |||||||
|  |  | ||||||
|    <!-- Get list of node ids which reference given content url --> |    <!-- Get list of node ids which reference given content url --> | ||||||
|    <select id="select_NodeIdsWhichReferenceContentUrl" |    <select id="select_NodeIdsWhichReferenceContentUrl" | ||||||
|            parameterType="ContentUrl" |            parameterMap="parameter_NodeIdsWhichReferenceContentUrl" | ||||||
|            resultMap="result_NodeIds"> |            resultMap="result_NodeIds"> | ||||||
|       select |       select | ||||||
|          p.node_id |          p.node_id | ||||||
|       from |       from | ||||||
|          alf_content_url cu |          alf_content_url cu | ||||||
|       LEFT OUTER JOIN alf_content_data cd ON (cd.content_url_id = cu.id) |          left outer join alf_content_data cd ON (cd.content_url_id = cu.id) | ||||||
|       LEFT OUTER JOIN alf_node_properties p ON (p.long_value = cd.id) |          left outer join alf_node_properties p ON (p.long_value = cd.id) | ||||||
|       WHERE |          left outer join alf_qname q ON (q.id = p.qname_id) | ||||||
|          content_url_short = #{contentUrlShort} and |          left outer join alf_namespace n ON (n.id = q.ns_id) | ||||||
|          content_url_crc = #{contentUrlCrc} |       where | ||||||
|  |          cu.content_url_short = ? and | ||||||
|  |          cu.content_url_crc = ? and | ||||||
|  |          q.local_name = ? and | ||||||
|  |          n.uri = ? | ||||||
|    </select> |    </select> | ||||||
|  |  | ||||||
|    <select id="select_RecordFoldersWithSchedules" |    <select id="select_RecordFoldersWithSchedules" | ||||||
|   | |||||||
| @@ -611,6 +611,7 @@ | |||||||
|         <property name="authorityService" ref="authorityService"/> |         <property name="authorityService" ref="authorityService"/> | ||||||
|         <property name="permissionService" ref="permissionService"/> |         <property name="permissionService" ref="permissionService"/> | ||||||
|         <property name="transactionService" ref="transactionService"/> |         <property name="transactionService" ref="transactionService"/> | ||||||
|  |         <property name="enableUsernameNormalization" value="${rm.extendedSecurity.enableUsernameNormalization}" /> | ||||||
|     </bean> |     </bean> | ||||||
|  |  | ||||||
|     <bean id="ExtendedSecurityService" class="org.springframework.aop.framework.ProxyFactoryBean"> |     <bean id="ExtendedSecurityService" class="org.springframework.aop.framework.ProxyFactoryBean"> | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |       <version>25.3.0.57</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <properties> |    <properties> | ||||||
| @@ -84,11 +84,6 @@ | |||||||
|          <artifactId>junit</artifactId> |          <artifactId>junit</artifactId> | ||||||
|          <scope>test</scope> |          <scope>test</scope> | ||||||
|       </dependency> |       </dependency> | ||||||
|       <dependency> |  | ||||||
|          <groupId>com.epam.reportportal</groupId> |  | ||||||
|          <artifactId>agent-java-testng</artifactId> |  | ||||||
|          <scope>test</scope> |  | ||||||
|       </dependency> |  | ||||||
|       <dependency> |       <dependency> | ||||||
|          <groupId>org.postgresql</groupId> |          <groupId>org.postgresql</groupId> | ||||||
|          <artifactId>postgresql</artifactId> |          <artifactId>postgresql</artifactId> | ||||||
|   | |||||||
| @@ -39,6 +39,7 @@ import org.apache.commons.logging.Log; | |||||||
| import org.apache.commons.logging.LogFactory; | import org.apache.commons.logging.LogFactory; | ||||||
| import org.mybatis.spring.SqlSessionTemplate; | import org.mybatis.spring.SqlSessionTemplate; | ||||||
|  |  | ||||||
|  | import org.alfresco.model.ContentModel; | ||||||
| import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; | import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel; | ||||||
| import org.alfresco.repo.domain.contentdata.ContentUrlEntity; | import org.alfresco.repo.domain.contentdata.ContentUrlEntity; | ||||||
| import org.alfresco.repo.domain.node.NodeDAO; | import org.alfresco.repo.domain.node.NodeDAO; | ||||||
| @@ -191,13 +192,19 @@ public class RecordsManagementQueryDAOImpl implements RecordsManagementQueryDAO, | |||||||
|         ContentUrlEntity contentUrlEntity = new ContentUrlEntity(); |         ContentUrlEntity contentUrlEntity = new ContentUrlEntity(); | ||||||
|         contentUrlEntity.setContentUrl(contentUrl.toLowerCase()); |         contentUrlEntity.setContentUrl(contentUrl.toLowerCase()); | ||||||
|  |  | ||||||
|  |         Map<String, Object> params = new HashMap<>(4); | ||||||
|  |         params.put("contentUrlShort", contentUrlEntity.getContentUrlShort()); | ||||||
|  |         params.put("contentUrlCrc", contentUrlEntity.getContentUrlCrc()); | ||||||
|  |         params.put("localName", ContentModel.PROP_CONTENT.getLocalName()); | ||||||
|  |         params.put("uri", ContentModel.PROP_CONTENT.getNamespaceURI()); | ||||||
|  |  | ||||||
|         if (logger.isDebugEnabled()) |         if (logger.isDebugEnabled()) | ||||||
|         { |         { | ||||||
|             logger.debug("Executing query " + SELECT_NODE_IDS_WHICH_REFERENCE_CONTENT_URL); |             logger.debug("Executing query " + SELECT_NODE_IDS_WHICH_REFERENCE_CONTENT_URL); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // Get all the node ids which reference the given content url |         // Get all the node ids which reference the given content url | ||||||
|         List<Long> nodeIds = template.selectList(SELECT_NODE_IDS_WHICH_REFERENCE_CONTENT_URL, contentUrlEntity); |         List<Long> nodeIds = template.selectList(SELECT_NODE_IDS_WHICH_REFERENCE_CONTENT_URL, params); | ||||||
|  |  | ||||||
|         if (logger.isDebugEnabled()) |         if (logger.isDebugEnabled()) | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -31,13 +31,16 @@ import static org.alfresco.service.cmr.security.PermissionService.GROUP_PREFIX; | |||||||
|  |  | ||||||
| import java.util.Collections; | import java.util.Collections; | ||||||
| import java.util.HashSet; | import java.util.HashSet; | ||||||
|  | import java.util.LinkedHashSet; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
|  |  | ||||||
| import org.springframework.context.ApplicationListener; | import org.springframework.context.ApplicationListener; | ||||||
| import org.springframework.context.event.ContextRefreshedEvent; | import org.springframework.context.event.ContextRefreshedEvent; | ||||||
|  | import org.springframework.dao.ConcurrencyFailureException; | ||||||
| import org.springframework.extensions.webscripts.ui.common.StringUtils; | import org.springframework.extensions.webscripts.ui.common.StringUtils; | ||||||
|  |  | ||||||
|  | import org.alfresco.model.ContentModel; | ||||||
| import org.alfresco.model.RenditionModel; | import org.alfresco.model.RenditionModel; | ||||||
| import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel; | import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel; | ||||||
| import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; | import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; | ||||||
| @@ -96,6 +99,8 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|     /** transaction service */ |     /** transaction service */ | ||||||
|     private TransactionService transactionService; |     private TransactionService transactionService; | ||||||
|  |  | ||||||
|  |     private boolean enableUsernameNormalization; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @param filePlanService |      * @param filePlanService | ||||||
|      *            file plan service |      *            file plan service | ||||||
| @@ -141,6 +146,15 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|         this.transactionService = transactionService; |         this.transactionService = transactionService; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @param enableUsernameNormalization | ||||||
|  |      *            enable username normalization to ensure correct casing | ||||||
|  |      */ | ||||||
|  |     public void setEnableUsernameNormalization(boolean enableUsernameNormalization) | ||||||
|  |     { | ||||||
|  |         this.enableUsernameNormalization = enableUsernameNormalization; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Application context refresh event handler |      * Application context refresh event handler | ||||||
|      */ |      */ | ||||||
| @@ -234,7 +248,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|      */ |      */ | ||||||
|     private Set<String> getAuthorities(String group) |     private Set<String> getAuthorities(String group) | ||||||
|     { |     { | ||||||
|         Set<String> result = new HashSet<>(); |         Set<String> result = new LinkedHashSet<>(); | ||||||
|         result.addAll(authorityService.getContainedAuthorities(null, group, true)); |         result.addAll(authorityService.getContainedAuthorities(null, group, true)); | ||||||
|         return result; |         return result; | ||||||
|     } |     } | ||||||
| @@ -359,12 +373,18 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|     { |     { | ||||||
|         String group = null; |         String group = null; | ||||||
|  |  | ||||||
|  |         // If enabled, the authorities are forced to match the correct casing of the usernames in case they were set | ||||||
|  |         // with the incorrect casing. | ||||||
|  |         // If not, it will just use the authorities as they are. | ||||||
|  |         // In normal circumstances, the authorities are in the correct casing, so this is disabled by default. | ||||||
|  |         Set<String> authoritySet = normalizeAuthorities(authorities); | ||||||
|  |  | ||||||
|         // find group or determine what the next index is if no group exists or there is a clash |         // find group or determine what the next index is if no group exists or there is a clash | ||||||
|         Pair<String, Integer> groupResult = findIPRGroup(groupPrefix, authorities); |         Pair<String, Integer> groupResult = findIPRGroup(groupPrefix, authoritySet); | ||||||
|  |  | ||||||
|         if (groupResult.getFirst() == null) |         if (groupResult.getFirst() == null) | ||||||
|         { |         { | ||||||
|             group = createIPRGroup(groupPrefix, authorities, groupResult.getSecond()); |             group = createIPRGroup(groupPrefix, authoritySet, groupResult.getSecond()); | ||||||
|         } |         } | ||||||
|         else |         else | ||||||
|         { |         { | ||||||
| @@ -399,7 +419,8 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|         while (hasMoreItems == true) |         while (hasMoreItems == true) | ||||||
|         { |         { | ||||||
|             // get matching authorities |             // get matching authorities | ||||||
|             PagingResults<String> results = authorityService.getAuthorities(AuthorityType.GROUP, |             PagingResults<String> results = authorityService.getAuthorities( | ||||||
|  |                     AuthorityType.GROUP, | ||||||
|                     RMAuthority.ZONE_APP_RM, |                     RMAuthority.ZONE_APP_RM, | ||||||
|                     groupShortNamePrefix, |                     groupShortNamePrefix, | ||||||
|                     false, |                     false, | ||||||
| @@ -427,6 +448,63 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|         return new Pair<>(iprGroup, nextGroupIndex); |         return new Pair<>(iprGroup, nextGroupIndex); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Given a set of authorities, normalizes the authority names to ensure correct casing. | ||||||
|  |      *  | ||||||
|  |      * @param authNames | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     private Set<String> normalizeAuthorities(Set<String> authNames) | ||||||
|  |     { | ||||||
|  |         // If disabled or no authorities, return as is | ||||||
|  |         if (!enableUsernameNormalization || authNames == null || authNames.isEmpty()) | ||||||
|  |         { | ||||||
|  |             return authNames; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         Set<String> normalizedAuthorities = new HashSet<>(); | ||||||
|  |         for (String authorityName : authNames) | ||||||
|  |         { | ||||||
|  |             normalizedAuthorities.add(normalizeAuthorityName(authorityName)); | ||||||
|  |         } | ||||||
|  |         return normalizedAuthorities; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Usernames are case insensitive but affect the IPR group matching when set with different casing. For a given authority of type user, this method normalizes the authority name. If group, it returns the name as-is. | ||||||
|  |      * | ||||||
|  |      * @param authorityName | ||||||
|  |      *            the authority name to normalize | ||||||
|  |      * @return the normalized authority name | ||||||
|  |      */ | ||||||
|  |     private String normalizeAuthorityName(String authorityName) | ||||||
|  |     { | ||||||
|  |         if (authorityName == null || authorityName.startsWith(GROUP_PREFIX)) | ||||||
|  |         { | ||||||
|  |             return authorityName; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // For users, attempt to get the correct casing from the username property of the user node | ||||||
|  |         if (authorityService.authorityExists(authorityName)) | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 NodeRef authorityNodeRef = authorityService.getAuthorityNodeRef(authorityName); | ||||||
|  |                 if (authorityNodeRef != null) | ||||||
|  |                 { | ||||||
|  |                     String username = (String) nodeService.getProperty(authorityNodeRef, ContentModel.PROP_USERNAME); | ||||||
|  |                     return username != null ? username : authorityName; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch (Exception e) | ||||||
|  |             { | ||||||
|  |                 // If anything goes wrong, fallback to the original name | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         return authorityName; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Determines whether a group exactly matches a list of authorities. |      * Determines whether a group exactly matches a list of authorities. | ||||||
|      * |      * | ||||||
| @@ -573,8 +651,8 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl | |||||||
|         } |         } | ||||||
|         catch (DuplicateChildNodeNameException ex) |         catch (DuplicateChildNodeNameException ex) | ||||||
|         { |         { | ||||||
|             // the group was concurrently created |             // Rethrow as ConcurrencyFailureException so that is can be retried and linked to the group created by the concurrent transaction | ||||||
|             group = authorityService.getName(AuthorityType.GROUP, groupShortName); |             throw new ConcurrencyFailureException("IPR group creation failed due to concurrent duplicate group name creation: " + groupShortName); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return group; |         return group; | ||||||
|   | |||||||
| @@ -33,6 +33,7 @@ import java.io.Serializable; | |||||||
| import java.util.Arrays; | import java.util.Arrays; | ||||||
| import java.util.Collections; | import java.util.Collections; | ||||||
| import java.util.HashSet; | import java.util.HashSet; | ||||||
|  | import java.util.LinkedHashSet; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
|  |  | ||||||
| @@ -325,8 +326,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme | |||||||
|             return aclReaders; |             return aclReaders; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         HashSet<String> assigned = new HashSet<>(); |         Set<String> assigned = new LinkedHashSet<>(); | ||||||
|         HashSet<String> readers = new HashSet<>(); |         Set<String> readers = new LinkedHashSet<>(); | ||||||
|  |  | ||||||
|         for (AccessControlEntry ace : acl.getEntries()) |         for (AccessControlEntry ace : acl.getEntries()) | ||||||
|         { |         { | ||||||
| @@ -412,8 +413,8 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme | |||||||
|             return aclWriters; |             return aclWriters; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         HashSet<String> assigned = new HashSet<>(); |         Set<String> assigned = new LinkedHashSet<>(); | ||||||
|         HashSet<String> readers = new HashSet<>(); |         Set<String> readers = new LinkedHashSet<>(); | ||||||
|  |  | ||||||
|         for (AccessControlEntry ace : acl.getEntries()) |         for (AccessControlEntry ace : acl.getEntries()) | ||||||
|         { |         { | ||||||
| @@ -485,7 +486,7 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl impleme | |||||||
|         Set<String> writers = getWriters(aclId); |         Set<String> writers = getWriters(aclId); | ||||||
|  |  | ||||||
|         // add the current owner to the list of extended writers |         // add the current owner to the list of extended writers | ||||||
|         Set<String> modifiedWrtiers = new HashSet<>(writers); |         Set<String> modifiedWrtiers = new LinkedHashSet<>(writers); | ||||||
|         String owner = ownableService.getOwner(nodeRef); |         String owner = ownableService.getOwner(nodeRef); | ||||||
|         if (StringUtils.isNotBlank(owner) && |         if (StringUtils.isNotBlank(owner) && | ||||||
|                 !owner.equals(OwnableService.NO_OWNER) && |                 !owner.equals(OwnableService.NO_OWNER) && | ||||||
|   | |||||||
| @@ -29,14 +29,23 @@ package org.alfresco.module.org_alfresco_module_rm.test.legacy.service; | |||||||
|  |  | ||||||
| import java.util.HashSet; | import java.util.HashSet; | ||||||
| import java.util.Set; | import java.util.Set; | ||||||
|  | import java.util.concurrent.CompletableFuture; | ||||||
|  |  | ||||||
|  | import org.junit.Assert; | ||||||
|  | import org.springframework.dao.ConcurrencyFailureException; | ||||||
|  |  | ||||||
| import org.alfresco.model.ContentModel; | import org.alfresco.model.ContentModel; | ||||||
| import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase; | import org.alfresco.module.org_alfresco_module_rm.test.util.BaseRMTestCase; | ||||||
|  | import org.alfresco.query.PagingRequest; | ||||||
|  | import org.alfresco.query.PagingResults; | ||||||
| import org.alfresco.repo.security.authentication.AuthenticationUtil; | import org.alfresco.repo.security.authentication.AuthenticationUtil; | ||||||
| import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork; | import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork; | ||||||
| import org.alfresco.repo.site.SiteModel; | import org.alfresco.repo.site.SiteModel; | ||||||
|  | import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; | ||||||
| import org.alfresco.service.cmr.repository.NodeRef; | import org.alfresco.service.cmr.repository.NodeRef; | ||||||
|  | import org.alfresco.service.cmr.security.AccessPermission; | ||||||
| import org.alfresco.service.cmr.security.AccessStatus; | import org.alfresco.service.cmr.security.AccessStatus; | ||||||
|  | import org.alfresco.service.cmr.security.AuthorityType; | ||||||
| import org.alfresco.service.cmr.site.SiteService; | import org.alfresco.service.cmr.site.SiteService; | ||||||
| import org.alfresco.service.cmr.site.SiteVisibility; | import org.alfresco.service.cmr.site.SiteVisibility; | ||||||
| import org.alfresco.util.GUID; | import org.alfresco.util.GUID; | ||||||
| @@ -206,7 +215,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase | |||||||
|         final NodeRef record = doTestInTransaction(new Test<NodeRef>() { |         final NodeRef record = doTestInTransaction(new Test<NodeRef>() { | ||||||
|             public NodeRef run() throws Exception |             public NodeRef run() throws Exception | ||||||
|             { |             { | ||||||
|                 NodeRef record = fileFolderService.create(documentLibrary, GUID.generate(), ContentModel.TYPE_CONTENT).getNodeRef(); |                 NodeRef record = fileFolderService.create(documentLibrary, GUID.generate(), ContentModel.TYPE_CONTENT) | ||||||
|  |                         .getNodeRef(); | ||||||
|                 recordService.createRecord(filePlan, record); |                 recordService.createRecord(filePlan, record); | ||||||
|                 return record; |                 return record; | ||||||
|             } |             } | ||||||
| @@ -279,4 +289,238 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase | |||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     public void testConcurrentSetWithRetry() | ||||||
|  |     { | ||||||
|  |         Set<String> extendedReaders = new HashSet<>(2); | ||||||
|  |         Set<String> extendedWriters = new HashSet<>(2); | ||||||
|  |  | ||||||
|  |         Set<NodeRef> documents = setupConcurrentTestCase(10, extendedReaders, extendedWriters); | ||||||
|  |  | ||||||
|  |         // For each record created previously, spawn a thread to set extended security so we cause concurrency | ||||||
|  |         // failure trying to create IPR groups with the same name | ||||||
|  |         fireParallelExecutionOfSetExtendedSecurity(documents, extendedReaders, extendedWriters, true); | ||||||
|  |  | ||||||
|  |         // Look for duplicated IPR groups and verify all documents have the same groups assigned | ||||||
|  |         verifyCreatedGroups(documents, false); | ||||||
|  |  | ||||||
|  |         AuthenticationUtil.clearCurrentSecurityContext(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public void testConcurrentSetWithoutRetry() | ||||||
|  |     { | ||||||
|  |         Set<String> extendedReaders = new HashSet<>(2); | ||||||
|  |         Set<String> extendedWriters = new HashSet<>(2); | ||||||
|  |  | ||||||
|  |         Set<NodeRef> documents = setupConcurrentTestCase(10, extendedReaders, extendedWriters); | ||||||
|  |  | ||||||
|  |         // For each record created previously, spawn a thread to set extended security so we cause concurrency | ||||||
|  |         // failure trying to create IPR groups with the same name. | ||||||
|  |         // Since there is no retry, we expect to get a ConcurrencyFailureException | ||||||
|  |         Assert.assertThrows(ConcurrencyFailureException.class, () -> { | ||||||
|  |             fireParallelExecutionOfSetExtendedSecurity(documents, extendedReaders, extendedWriters, false); | ||||||
|  |         }); | ||||||
|  |  | ||||||
|  |         // Look for duplicated IPR groups and verify all documents have the same groups assigned | ||||||
|  |         // Since there was a ConcurrencyFailureException some threads failed to set extended security so some | ||||||
|  |         // documents may not have IPR groups created. | ||||||
|  |         verifyCreatedGroups(documents, true); | ||||||
|  |  | ||||||
|  |         AuthenticationUtil.clearCurrentSecurityContext(); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private Set<NodeRef> setupConcurrentTestCase(int concurrentThreads, Set<String> extendedReaders, Set<String> extendedWriters) | ||||||
|  |     { | ||||||
|  |         final String usera = createTestUser(); | ||||||
|  |         final String userb = createTestUser(); | ||||||
|  |         final String owner = createTestUser(); | ||||||
|  |  | ||||||
|  |         extendedReaders.add(usera); | ||||||
|  |         extendedReaders.add(userb); | ||||||
|  |         extendedWriters.add(usera); | ||||||
|  |         extendedWriters.add(userb); | ||||||
|  |  | ||||||
|  |         AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); | ||||||
|  |  | ||||||
|  |         // Create a site | ||||||
|  |         NodeRef documentLib = createSite(new HashSet<>(), new HashSet<>()); | ||||||
|  |  | ||||||
|  |         // Create records in the site document library | ||||||
|  |         return createRecords(concurrentThreads, documentLib, owner); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private NodeRef createSite(Set<String> readers, Set<String> writers) | ||||||
|  |     { | ||||||
|  |         return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<NodeRef>() { | ||||||
|  |             @Override | ||||||
|  |             public NodeRef execute() throws Throwable | ||||||
|  |             { | ||||||
|  |                 final String siteShortName = GUID.generate(); | ||||||
|  |                 siteService.createSite(null, siteShortName, "test", "test", SiteVisibility.PRIVATE); | ||||||
|  |                 readers.forEach(reader -> siteService.setMembership(siteShortName, reader, SiteModel.SITE_CONSUMER)); | ||||||
|  |                 writers.forEach(writer -> siteService.setMembership(siteShortName, writer, SiteModel.SITE_COLLABORATOR)); | ||||||
|  |                 return siteService.createContainer(siteShortName, SiteService.DOCUMENT_LIBRARY, null, null); | ||||||
|  |             } | ||||||
|  |         }, false, true); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private Set<NodeRef> createRecords(int numRecords, NodeRef parent, String owner) | ||||||
|  |     { | ||||||
|  |         return retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Set<NodeRef>>() { | ||||||
|  |             @Override | ||||||
|  |             public Set<NodeRef> execute() throws Throwable | ||||||
|  |             { | ||||||
|  |                 int createdRecords = 0; | ||||||
|  |                 Set<NodeRef> documents = new HashSet<>(); | ||||||
|  |                 while (createdRecords < numRecords) | ||||||
|  |                 { | ||||||
|  |                     final NodeRef doc = fileFolderService.create(parent, GUID.generate(), ContentModel.TYPE_CONTENT).getNodeRef(); | ||||||
|  |                     ownableService.setOwner(doc, owner); | ||||||
|  |                     recordService.createRecord(filePlan, doc, rmFolder, true); | ||||||
|  |                     recordService.file(doc); | ||||||
|  |                     recordService.complete(doc); | ||||||
|  |                     documents.add(doc); | ||||||
|  |                     createdRecords++; | ||||||
|  |                 } | ||||||
|  |                 return documents; | ||||||
|  |             } | ||||||
|  |         }, false, true); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void setExtendedSecurity(NodeRef doc, Set<String> readers, Set<String> writers, boolean useRetry) | ||||||
|  |     { | ||||||
|  |         if (!useRetry) | ||||||
|  |         { | ||||||
|  |             setExtendedSecurity(doc, readers, writers); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Void>() { | ||||||
|  |             @Override | ||||||
|  |             public Void execute() throws Throwable | ||||||
|  |             { | ||||||
|  |                 setExtendedSecurity(doc, readers, writers); | ||||||
|  |                 return null; | ||||||
|  |             } | ||||||
|  |         }, false, true); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void setExtendedSecurity(NodeRef doc, Set<String> readers, Set<String> writers) | ||||||
|  |     { | ||||||
|  |         AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser(); | ||||||
|  |         extendedSecurityService.set(doc, readers, writers); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void fireParallelExecutionOfSetExtendedSecurity(Set<NodeRef> documents, Set<String> extendedReaders, Set<String> extendedWriters, boolean useRetry) | ||||||
|  |     { | ||||||
|  |         CompletableFuture<?>[] futures = documents.stream() | ||||||
|  |                 .map(doc -> CompletableFuture.runAsync(() -> setExtendedSecurity(doc, extendedReaders, extendedWriters, useRetry))) | ||||||
|  |                 .toArray(CompletableFuture[]::new); | ||||||
|  |  | ||||||
|  |         try | ||||||
|  |         { | ||||||
|  |             CompletableFuture.allOf(futures).join(); | ||||||
|  |         } | ||||||
|  |         catch (Exception e) | ||||||
|  |         { | ||||||
|  |             Throwable cause = e.getCause(); | ||||||
|  |             if (cause instanceof ConcurrencyFailureException) | ||||||
|  |             { | ||||||
|  |                 throw (ConcurrencyFailureException) cause; | ||||||
|  |             } | ||||||
|  |             throw new RuntimeException("Error during parallel execution", e); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void verifyCreatedGroups(Set<NodeRef> documents, boolean onlyDuplicatesValidation) | ||||||
|  |     { | ||||||
|  |         retryingTransactionHelper.doInTransaction(new RetryingTransactionCallback<Void>() { | ||||||
|  |             @Override | ||||||
|  |             public Void execute() throws Throwable | ||||||
|  |             { | ||||||
|  |                 Set<String> expectedAuthorities = null; | ||||||
|  |                 Set<Set<String>> errors = new HashSet<>(); | ||||||
|  |                 for (NodeRef doc : documents) | ||||||
|  |                 { | ||||||
|  |                     Set<AccessPermission> permissions = permissionService.getAllSetPermissions(doc); | ||||||
|  |                     Set<String> authorities = getDocumentAuthorities(permissions); | ||||||
|  |                     Set<String> authoritiesById = getAuthorityIds(authorities); | ||||||
|  |  | ||||||
|  |                     verifyIPRGroups(authorities, onlyDuplicatesValidation); | ||||||
|  |  | ||||||
|  |                     if (onlyDuplicatesValidation) | ||||||
|  |                     { | ||||||
|  |                         // Some documents may not have IPR groups created if there was a ConcurrencyFailureException | ||||||
|  |                         continue; | ||||||
|  |                     } | ||||||
|  |  | ||||||
|  |                     // All documents should have the same exact set of groups assigned | ||||||
|  |                     if (expectedAuthorities == null) | ||||||
|  |                     { | ||||||
|  |                         expectedAuthorities = authoritiesById; | ||||||
|  |                     } | ||||||
|  |  | ||||||
|  |                     if (!expectedAuthorities.equals(authoritiesById)) | ||||||
|  |                     { | ||||||
|  |                         errors.add(authoritiesById); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |  | ||||||
|  |                 assertTrue("Unexpected authorities linked to document", errors.isEmpty()); | ||||||
|  |  | ||||||
|  |                 return null; | ||||||
|  |             } | ||||||
|  |         }, false, true); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private Set<String> getDocumentAuthorities(Set<AccessPermission> permissions) | ||||||
|  |     { | ||||||
|  |         Set<String> authorities = new HashSet<>(); | ||||||
|  |  | ||||||
|  |         for (AccessPermission accessPermission : permissions) | ||||||
|  |         { | ||||||
|  |             String authority = accessPermission.getAuthority(); | ||||||
|  |             String authName = authorityService.getName(AuthorityType.GROUP, authority); | ||||||
|  |             authorities.add(authName); | ||||||
|  |  | ||||||
|  |         } | ||||||
|  |         return authorities; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private Set<String> getAuthorityIds(Set<String> authorities) | ||||||
|  |     { | ||||||
|  |         Set<String> authorityIds = new HashSet<>(); | ||||||
|  |         for (String authority : authorities) | ||||||
|  |         { | ||||||
|  |             String authId = authorityService.getAuthorityNodeRef(authority) != null | ||||||
|  |                     ? authorityService.getAuthorityNodeRef(authority).getId() | ||||||
|  |                     : null; | ||||||
|  |             authorityIds.add(authId); | ||||||
|  |         } | ||||||
|  |         return authorityIds; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private void verifyIPRGroups(Set<String> authorities, boolean onlyDuplicatesValidation) | ||||||
|  |     { | ||||||
|  |         boolean hasGroupIPR = false; | ||||||
|  |  | ||||||
|  |         for (String authorityName : authorities) | ||||||
|  |         { | ||||||
|  |             String shortName = authorityService.getShortName(authorityName); | ||||||
|  |  | ||||||
|  |             if (authorityName.startsWith("GROUP_IPR")) | ||||||
|  |             { | ||||||
|  |                 hasGroupIPR = true; | ||||||
|  |                 PagingResults<String> results = authorityService.getAuthorities(AuthorityType.GROUP, null, shortName, false, | ||||||
|  |                         false, new PagingRequest(0, 10)); | ||||||
|  |  | ||||||
|  |                 assertEquals("No duplicated IPR group expected", 1, results.getPage().size()); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         if (!onlyDuplicatesValidation) | ||||||
|  |         { | ||||||
|  |             assertTrue("No IPR Groups created", hasGroupIPR); | ||||||
|  |         } | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -4,7 +4,7 @@ | |||||||
|  |  | ||||||
| # Version label | # Version label | ||||||
| version.major=25 | version.major=25 | ||||||
| version.minor=2 | version.minor=3 | ||||||
| version.revision=0 | version.revision=0 | ||||||
| version.label= | version.label= | ||||||
|  |  | ||||||
|   | |||||||
| @@ -52,6 +52,7 @@ import java.util.Set; | |||||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||||
| import java.util.stream.Stream; | import java.util.stream.Stream; | ||||||
|  |  | ||||||
|  | import org.alfresco.model.ContentModel; | ||||||
| import org.alfresco.model.RenditionModel; | import org.alfresco.model.RenditionModel; | ||||||
| import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel; | import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel; | ||||||
| import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; | import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; | ||||||
| @@ -67,6 +68,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransacti | |||||||
| import org.alfresco.service.cmr.repository.ChildAssociationRef; | import org.alfresco.service.cmr.repository.ChildAssociationRef; | ||||||
| import org.alfresco.service.cmr.repository.NodeRef; | import org.alfresco.service.cmr.repository.NodeRef; | ||||||
| import org.alfresco.service.cmr.repository.NodeService; | import org.alfresco.service.cmr.repository.NodeService; | ||||||
|  | import org.alfresco.service.cmr.repository.StoreRef; | ||||||
| import org.alfresco.service.cmr.security.AccessPermission; | import org.alfresco.service.cmr.security.AccessPermission; | ||||||
| import org.alfresco.service.cmr.security.AccessStatus; | import org.alfresco.service.cmr.security.AccessStatus; | ||||||
| import org.alfresco.service.cmr.security.AuthorityService; | import org.alfresco.service.cmr.security.AuthorityService; | ||||||
| @@ -523,6 +525,104 @@ public class ExtendedSecurityServiceImplUnitTest | |||||||
|          |          | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Given a node with no previous IPR groups assigned | ||||||
|  |      * And having pre-existing IPR groups matching the ones we need | ||||||
|  |      * When I add some read and write authorities but with a different casing | ||||||
|  |      * Then the existing IPR groups are used | ||||||
|  |      */ | ||||||
|  |     @SuppressWarnings("unchecked") | ||||||
|  |     @Test public void addExtendedSecurityWithMixedCasingUsernames() | ||||||
|  |     { | ||||||
|  |         // Have the usernames in the node as the correct usernames but with incorrect casing | ||||||
|  |         String user1 = "UseR"; | ||||||
|  |         String user2 = "UseR_w"; | ||||||
|  |  | ||||||
|  |         // Incorrect IPR Group names | ||||||
|  |         Set<String> diffCasingReaders = Stream.of(user1, GROUP).collect(Collectors.toSet()); | ||||||
|  |         Set<String> diffCasingWriters = Stream.of(user2, GROUP_W).collect(Collectors.toSet()); | ||||||
|  |         String wrongReadGroupPrefix = extendedSecurityService.getIPRGroupPrefixShortName(READER_GROUP_PREFIX, diffCasingReaders); | ||||||
|  |         String wrongWriteGroupPrefix = extendedSecurityService.getIPRGroupPrefixShortName(WRITER_GROUP_PREFIX, diffCasingWriters); | ||||||
|  |         String wrongReadGroup = wrongReadGroupPrefix + "0"; | ||||||
|  |         String wrongWriteGroup = wrongWriteGroupPrefix + "0"; | ||||||
|  |  | ||||||
|  |         // Correct Group names | ||||||
|  |         String correctReadGroup = readGroupPrefix + "0"; | ||||||
|  |         String correctWriteGroup = writeGroupPrefix + "0"; | ||||||
|  |  | ||||||
|  |         // If queried for the correct groups, return the results | ||||||
|  |         PagingResults<String> mockedCorrectReadPResults = mock(PagingResults.class); | ||||||
|  |         PagingResults<String> mockedCorrectWritePResults = mock(PagingResults.class); | ||||||
|  |         when(mockedCorrectReadPResults.getPage()) | ||||||
|  |             .thenReturn(Stream.of(GROUP_PREFIX + correctReadGroup).collect(Collectors.toList())); | ||||||
|  |         when(mockedAuthorityService.getAuthorities( | ||||||
|  |                 eq(AuthorityType.GROUP),  | ||||||
|  |                 eq(RMAuthority.ZONE_APP_RM),  | ||||||
|  |                 eq(readGroupPrefix), | ||||||
|  |                 eq(false),  | ||||||
|  |                 eq(false),  | ||||||
|  |                 any(PagingRequest.class))) | ||||||
|  |             .thenReturn(mockedCorrectReadPResults); | ||||||
|  |          | ||||||
|  |         when(mockedCorrectWritePResults.getPage()) | ||||||
|  |             .thenReturn(Stream.of(GROUP_PREFIX + correctWriteGroup).collect(Collectors.toList())); | ||||||
|  |         when(mockedAuthorityService.getAuthorities( | ||||||
|  |                 eq(AuthorityType.GROUP),  | ||||||
|  |                 eq(RMAuthority.ZONE_APP_RM),  | ||||||
|  |                 eq(writeGroupPrefix), | ||||||
|  |                 eq(false),  | ||||||
|  |                 eq(false),  | ||||||
|  |                 any(PagingRequest.class))) | ||||||
|  |             .thenReturn(mockedCorrectWritePResults); | ||||||
|  |  | ||||||
|  |         // Don't return results for the incorrect groups (lenient as these may not be called with normalization enabled) | ||||||
|  |         PagingResults<String> mockedWrongReadPResults = mock(PagingResults.class); | ||||||
|  |         PagingResults<String> mockedWrongWritePResults = mock(PagingResults.class); | ||||||
|  |         lenient().when(mockedWrongReadPResults.getPage()) | ||||||
|  |             .thenReturn(Collections.emptyList()); | ||||||
|  |         lenient().when(mockedAuthorityService.getAuthorities( | ||||||
|  |                 eq(AuthorityType.GROUP),  | ||||||
|  |                 eq(RMAuthority.ZONE_APP_RM),  | ||||||
|  |                 eq(wrongReadGroupPrefix), | ||||||
|  |                 eq(false),  | ||||||
|  |                 eq(false),  | ||||||
|  |                 any(PagingRequest.class))) | ||||||
|  |             .thenReturn(mockedWrongReadPResults); | ||||||
|  |          | ||||||
|  |         lenient().when(mockedWrongWritePResults.getPage()) | ||||||
|  |             .thenReturn(Collections.emptyList()); | ||||||
|  |         lenient().when(mockedAuthorityService.getAuthorities( | ||||||
|  |                 eq(AuthorityType.GROUP),  | ||||||
|  |                 eq(RMAuthority.ZONE_APP_RM),  | ||||||
|  |                 eq(wrongWriteGroupPrefix), | ||||||
|  |                 eq(false),  | ||||||
|  |                 eq(false),  | ||||||
|  |                 any(PagingRequest.class))) | ||||||
|  |             .thenReturn(mockedWrongWritePResults); | ||||||
|  |  | ||||||
|  |         // The users do exist, despite being in a different casing and are able to be retrieved | ||||||
|  |         NodeRef noderefUser1 = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, USER); | ||||||
|  |         when(mockedAuthorityService.authorityExists(user1)).thenReturn(true); | ||||||
|  |         when(mockedAuthorityService.getAuthorityNodeRef(user1)).thenReturn(noderefUser1); | ||||||
|  |         when(mockedNodeService.getProperty(noderefUser1, ContentModel.PROP_USERNAME)).thenReturn(USER); | ||||||
|  |  | ||||||
|  |         NodeRef noderefUser2 = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, USER_W); | ||||||
|  |         when(mockedAuthorityService.authorityExists(user2)).thenReturn(true); | ||||||
|  |         when(mockedAuthorityService.getAuthorityNodeRef(user2)).thenReturn(noderefUser2); | ||||||
|  |         when(mockedNodeService.getProperty(noderefUser2, ContentModel.PROP_USERNAME)).thenReturn(USER_W); | ||||||
|  |  | ||||||
|  |         // Set the extended security service to normalize usernames | ||||||
|  |         extendedSecurityService.setEnableUsernameNormalization(true); | ||||||
|  |         extendedSecurityService.set(nodeRef, diffCasingReaders, diffCasingWriters); | ||||||
|  |  | ||||||
|  |         // Verify that the incorrect read group is not created | ||||||
|  |         verify(mockedAuthorityService, never()).createAuthority(AuthorityType.GROUP, wrongReadGroup, wrongReadGroup, Collections.singleton(RMAuthority.ZONE_APP_RM)); | ||||||
|  |  | ||||||
|  |         // Verify that the incorrect write group is not created | ||||||
|  |         verify(mockedAuthorityService, never()).createAuthority(AuthorityType.GROUP, wrongWriteGroup, wrongWriteGroup, Collections.singleton(RMAuthority.ZONE_APP_RM)); | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |      | ||||||
|     /** |     /** | ||||||
|      * Given a node with no previous IPR groups assigned |      * Given a node with no previous IPR groups assigned | ||||||
|      * And existing IPR groups matches existing has, but not exact match |      * And existing IPR groups matches existing has, but not exact match | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</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>25.2.0.43</version> |         <version>25.3.0.57</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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
| @@ -51,8 +51,8 @@ | |||||||
|             </exclusions> |             </exclusions> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>commons-lang</groupId> |             <groupId>org.apache.commons</groupId> | ||||||
|             <artifactId>commons-lang</artifactId> |             <artifactId>commons-lang3</artifactId> | ||||||
|             <scope>provided</scope> |             <scope>provided</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
| @@ -70,11 +70,6 @@ | |||||||
|             <artifactId>junit</artifactId> |             <artifactId>junit</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.postgresql</groupId> |             <groupId>org.postgresql</groupId> | ||||||
|             <artifactId>postgresql</artifactId> |             <artifactId>postgresql</artifactId> | ||||||
|   | |||||||
| @@ -28,7 +28,7 @@ import java.util.ResourceBundle; | |||||||
| import java.util.regex.Matcher; | import java.util.regex.Matcher; | ||||||
| import java.util.regex.Pattern; | import java.util.regex.Pattern; | ||||||
|  |  | ||||||
| import org.apache.commons.lang.StringEscapeUtils; | import org.apache.commons.lang3.StringEscapeUtils; | ||||||
| import org.json.simple.JSONObject; | import org.json.simple.JSONObject; | ||||||
| import org.springframework.extensions.webscripts.Cache; | import org.springframework.extensions.webscripts.Cache; | ||||||
| import org.springframework.extensions.webscripts.Status; | import org.springframework.extensions.webscripts.Status; | ||||||
| @@ -92,7 +92,7 @@ public class WikiPageGet extends AbstractWikiWebScript | |||||||
|                 { |                 { | ||||||
|                     links.add(link); |                     links.add(link); | ||||||
|                     // build the list of available pages |                     // build the list of available pages | ||||||
|                     WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml(link)); |                     WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml4(link)); | ||||||
|                     if (wikiPage != null) |                     if (wikiPage != null) | ||||||
|                     { |                     { | ||||||
|                         pageTitles.add(wikiPage.getTitle()); |                         pageTitles.add(wikiPage.getTitle()); | ||||||
|   | |||||||
| @@ -91,6 +91,15 @@ function doclist_getAllNodes(parsedArgs, filterParams, query, totalItemCount) | |||||||
|    }; |    }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function sanitizeJunkFavouriteKeys(favourites){ | ||||||
|  |    for (var key in favourites) { | ||||||
|  |       if (!key || key.trim() === "") { | ||||||
|  |          delete favourites[key]; | ||||||
|  |       } | ||||||
|  |    } | ||||||
|  |    return favourites; | ||||||
|  | } | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Main entry point: Create collection of documents and folders in the given space |  * Main entry point: Create collection of documents and folders in the given space | ||||||
|  * |  * | ||||||
| @@ -124,6 +133,47 @@ function doclist_main() | |||||||
|    if (logger.isLoggingEnabled()) |    if (logger.isLoggingEnabled()) | ||||||
|       logger.log("doclist.lib.js - NodeRef: " + parsedArgs.nodeRef + " Query: " + query); |       logger.log("doclist.lib.js - NodeRef: " + parsedArgs.nodeRef + " Query: " + query); | ||||||
|  |  | ||||||
|  |    favourites = sanitizeJunkFavouriteKeys(favourites); | ||||||
|  |    if(query === null) | ||||||
|  |    { | ||||||
|  |       return { | ||||||
|  |          luceneQuery: "", | ||||||
|  |          paging: { | ||||||
|  |             totalRecords: 0, | ||||||
|  |             startIndex: 0 | ||||||
|  |          }, | ||||||
|  |          container: parsedArgs.rootNode, | ||||||
|  |          parent: null, | ||||||
|  |          onlineEditing: utils.moduleInstalled("org.alfresco.module.vti"), | ||||||
|  |          itemCount: { | ||||||
|  |             folders: 0, | ||||||
|  |             documents: 0 | ||||||
|  |          }, | ||||||
|  |          items: [], | ||||||
|  |          customJSON: slingshotDocLib.getJSON() | ||||||
|  |       }; | ||||||
|  |    } | ||||||
|  |  | ||||||
|  |    if(Object.keys(favourites).length === 0 && query === null) | ||||||
|  |    { | ||||||
|  |       return { | ||||||
|  |          luceneQuery: "", | ||||||
|  |          paging: { | ||||||
|  |             totalRecords: 0, | ||||||
|  |             startIndex: 0 | ||||||
|  |          }, | ||||||
|  |          container: parsedArgs.rootNode, | ||||||
|  |          parent: null, | ||||||
|  |          onlineEditing: utils.moduleInstalled("org.alfresco.module.vti"), | ||||||
|  |          itemCount: { | ||||||
|  |             folders: 0, | ||||||
|  |             documents: 0 | ||||||
|  |          }, | ||||||
|  |          items: [], | ||||||
|  |          customJSON: slingshotDocLib.getJSON() | ||||||
|  |       }; | ||||||
|  |    } | ||||||
|  |     | ||||||
|    var totalItemCount = filterParams.limitResults ? parseInt(filterParams.limitResults, 10) : -1; |    var totalItemCount = filterParams.limitResults ? parseInt(filterParams.limitResults, 10) : -1; | ||||||
|    // For all sites documentLibrary query we pull in all available results and post filter |    // For all sites documentLibrary query we pull in all available results and post filter | ||||||
|    if (totalItemCount === 0) totalItemCount = -1; |    if (totalItemCount === 0) totalItemCount = -1; | ||||||
|   | |||||||
| @@ -181,6 +181,8 @@ var Filters = | |||||||
|  |  | ||||||
|          case "favourites": |          case "favourites": | ||||||
|             for (var favourite in favourites) |             for (var favourite in favourites) | ||||||
|  |             { | ||||||
|  |                if (favourite && favourite.trim() !== "") | ||||||
|                { |                { | ||||||
|                   if (filterQuery) |                   if (filterQuery) | ||||||
|                   { |                   { | ||||||
| @@ -188,6 +190,7 @@ var Filters = | |||||||
|                   } |                   } | ||||||
|                   filterQuery += "ID:\"" + favourite + "\""; |                   filterQuery += "ID:\"" + favourite + "\""; | ||||||
|                } |                } | ||||||
|  |             } | ||||||
|              |              | ||||||
|             if (filterQuery.length !== 0) |             if (filterQuery.length !== 0) | ||||||
|             { |             { | ||||||
| @@ -201,7 +204,13 @@ var Filters = | |||||||
|             else |             else | ||||||
|             { |             { | ||||||
|                // empty favourites query |                // empty favourites query | ||||||
|                filterQuery = "+ID:\"\""; |                logger.warn("No favourites found for user: " + person.properties.userName); | ||||||
|  |                return { | ||||||
|  |                   query: null, | ||||||
|  |                   limitResults: 0, | ||||||
|  |                   sort: [], | ||||||
|  |                   language: "lucene" | ||||||
|  |                }; | ||||||
|             } |             } | ||||||
|              |              | ||||||
|             filterParams.query = filterQuery; |             filterParams.query = filterQuery; | ||||||
| @@ -231,7 +240,7 @@ var Filters = | |||||||
|                   filterData = filterData.slice(0, -1); |                   filterData = filterData.slice(0, -1); | ||||||
|               } |               } | ||||||
|               filterQuery = this.constructPathQuery(parsedArgs); |               filterQuery = this.constructPathQuery(parsedArgs); | ||||||
|             filterParams.query = filterQuery + " +PATH:\"/cm:taggable/cm:" + search.ISO9075Encode(filterData) + "/member\""; |               filterParams.query = filterQuery + " +TAG:\"" + search.ISO9075Encode(filterData) + "\""; | ||||||
|               break; |               break; | ||||||
|  |  | ||||||
|          case "category": |          case "category": | ||||||
| @@ -240,8 +249,15 @@ var Filters = | |||||||
|             { |             { | ||||||
|                filterData = filterData.slice(0, -1); |                filterData = filterData.slice(0, -1); | ||||||
|             } |             } | ||||||
|             filterQuery = this.constructPathQuery(parsedArgs); |  | ||||||
|             filterParams.query = filterQuery + " +PATH:\"/cm:categoryRoot/cm:generalclassifiable" + Filters.iso9075EncodePath(filterData) + "/member\""; |             var categoryNodeRef = this.getCategoryNodeRef(filterData); | ||||||
|  |  | ||||||
|  |             if (categoryNodeRef && search.findNode(categoryNodeRef) != null) { | ||||||
|  |                filterParams.query = filterQuery + ' +@cm\\:categories:"' + categoryNodeRef + '"'; | ||||||
|  |             } else { | ||||||
|  |                logger.warn("category filter: skipping invalid category node : " + categoryNodeRef); | ||||||
|  |             } | ||||||
|  |             filterParams.language = "fts-alfresco"; | ||||||
|             break; |             break; | ||||||
|  |  | ||||||
|          case "aspect": |          case "aspect": | ||||||
| @@ -262,11 +278,24 @@ var Filters = | |||||||
|       { |       { | ||||||
|          filterParams.query += " " + (Filters.TYPE_MAP[parsedArgs.type] || ""); |          filterParams.query += " " + (Filters.TYPE_MAP[parsedArgs.type] || ""); | ||||||
|       } |       } | ||||||
|  |       logger.warn("Final Query : " + filterParams.query); | ||||||
|       return filterParams; |       return filterParams; | ||||||
|    }, |    }, | ||||||
|  |  | ||||||
|    constructPathQuery: function constructPathQuery(parsedArgs) |     getCategoryNodeRef: function(categoryName) { | ||||||
|  |         var results = search.luceneSearch( | ||||||
|  |             'PATH:"/cm:categoryRoot/cm:generalclassifiable//*" AND @cm\\:name:"' + categoryName + '"' | ||||||
|  |         ); | ||||||
|  |  | ||||||
|  |         if (results && results.length > 0) { | ||||||
|  |             return results[0].nodeRef.toString(); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         logger.warn("Category not found: " + categoryName); | ||||||
|  |         return null; | ||||||
|  |     }, | ||||||
|  |  | ||||||
|  |    constructPathQuery: function(parsedArgs) | ||||||
|    { |    { | ||||||
|       var pathQuery = ""; |       var pathQuery = ""; | ||||||
|       if (parsedArgs.libraryRoot != companyhome || parsedArgs.nodeRef != "alfresco://company/home") |       if (parsedArgs.libraryRoot != companyhome || parsedArgs.nodeRef != "alfresco://company/home") | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ import java.util.regex.Matcher; | |||||||
| import java.util.regex.Pattern; | import java.util.regex.Pattern; | ||||||
| import jakarta.transaction.UserTransaction; | import jakarta.transaction.UserTransaction; | ||||||
|  |  | ||||||
| import org.apache.commons.lang.StringEscapeUtils; | import org.apache.commons.lang3.StringEscapeUtils; | ||||||
| import org.apache.commons.logging.Log; | import org.apache.commons.logging.Log; | ||||||
| import org.apache.commons.logging.LogFactory; | import org.apache.commons.logging.LogFactory; | ||||||
| import org.json.JSONArray; | import org.json.JSONArray; | ||||||
| @@ -958,7 +958,7 @@ public class WikiRestApiTest extends BaseWebScriptTest | |||||||
|                 String link = m.group(1); |                 String link = m.group(1); | ||||||
|                 link += "?title=<script>alert('xss');</script>"; |                 link += "?title=<script>alert('xss');</script>"; | ||||||
|                 WikiPageInfo wikiPage2 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, link); |                 WikiPageInfo wikiPage2 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, link); | ||||||
|                 WikiPageInfo wikiPage1 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, StringEscapeUtils.unescapeHtml(link)); |                 WikiPageInfo wikiPage1 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, StringEscapeUtils.unescapeHtml4(link)); | ||||||
|                 assertEquals(wikiPage2, wikiPage1); |                 assertEquals(wikiPage2, wikiPage1); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |       <version>25.3.0.57</version> | ||||||
|    </parent> |    </parent> | ||||||
|  |  | ||||||
|    <dependencies> |    <dependencies> | ||||||
| @@ -126,11 +126,6 @@ | |||||||
|          <artifactId>junit</artifactId> |          <artifactId>junit</artifactId> | ||||||
|          <scope>test</scope> |          <scope>test</scope> | ||||||
|       </dependency> |       </dependency> | ||||||
|       <dependency> |  | ||||||
|          <groupId>com.epam.reportportal</groupId> |  | ||||||
|          <artifactId>agent-java-testng</artifactId> |  | ||||||
|          <scope>test</scope> |  | ||||||
|       </dependency> |  | ||||||
|       <dependency> |       <dependency> | ||||||
|          <groupId>org.mockito</groupId> |          <groupId>org.mockito</groupId> | ||||||
|          <artifactId>mockito-core</artifactId> |          <artifactId>mockito-core</artifactId> | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
| @@ -144,7 +144,7 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>com.fasterxml.woodstox</groupId> |             <groupId>com.fasterxml.woodstox</groupId> | ||||||
|             <artifactId>woodstox-core</artifactId> |             <artifactId>woodstox-core</artifactId> | ||||||
|             <version>7.0.0</version> |             <version>7.1.1</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <!-- the cxf libs were updated, see dependencyManagement section --> |         <!-- the cxf libs were updated, see dependencyManagement section --> | ||||||
| @@ -247,11 +247,6 @@ | |||||||
|             <artifactId>junit</artifactId> |             <artifactId>junit</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.antlr</groupId> |             <groupId>org.antlr</groupId> | ||||||
|             <artifactId>gunit</artifactId> |             <artifactId>gunit</artifactId> | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
| @@ -46,11 +46,6 @@ | |||||||
|             <artifactId>junit</artifactId> |             <artifactId>junit</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.mockito</groupId> |             <groupId>org.mockito</groupId> | ||||||
|             <artifactId>mockito-core</artifactId> |             <artifactId>mockito-core</artifactId> | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
| </project> | </project> | ||||||
|   | |||||||
| @@ -37,7 +37,6 @@ commons-fileupload  http://jakarta.apache.org/commons/ | |||||||
| commons-httpclient  http://jakarta.apache.org/commons/  | commons-httpclient  http://jakarta.apache.org/commons/  | ||||||
| commons-io  http://jakarta.apache.org/commons/  | commons-io  http://jakarta.apache.org/commons/  | ||||||
| commons-jxpath  http://jakarta.apache.org/commons/  | commons-jxpath  http://jakarta.apache.org/commons/  | ||||||
| commons-lang    http://jakarta.apache.org/commons/  |  | ||||||
| commons-lang3   http://jakarta.apache.org/commons/ | commons-lang3   http://jakarta.apache.org/commons/ | ||||||
| commons-logging http://jakarta.apache.org/commons/  | commons-logging http://jakarta.apache.org/commons/  | ||||||
| commons-net http://jakarta.apache.org/commons/ | commons-net http://jakarta.apache.org/commons/ | ||||||
|   | |||||||
| @@ -1,6 +1,5 @@ | |||||||
| # More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat | # More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat | ||||||
| FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:9622418e142fb4fe1c5320666ad61ea292bc5c98f3dd0b550b6add33d18f659f | FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:00d89fb84bda7bb37c17b0117adb2cfe4f7cbddcd6c1e42b0a67ea8dbb41a734 | ||||||
|  |  | ||||||
| # Set default docker_context. | # Set default docker_context. | ||||||
| ARG resource_path=target | ARG resource_path=target | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <modules> |     <modules> | ||||||
|   | |||||||
| @@ -1,3 +1,3 @@ | |||||||
| SOLR6_TAG=2.0.15 | SOLR6_TAG=2.0.16 | ||||||
| POSTGRES_TAG=16.6 | POSTGRES_TAG=16.6 | ||||||
| ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8 | ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8 | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <modules> |     <modules> | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
|  |  | ||||||
| ## Synopsis | ## Synopsis | ||||||
|  |  | ||||||
| **TAS**( **T**est **A**utomation **S**ystem)- **CMIS** is the project that handles the automated tests related only to CMIS API integrated with Alfresco One [Alfresco CMIS API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Reference/CMIS-API).  | **TAS**( **T**est **A**utomation **S**ystem)- **CMIS** is the project that handles the automated tests related only to CMIS API integrated with Alfresco One [Alfresco CMIS API](https://support.hyland.com/access?dita:id=kvf1721390177551&vrm_version=25.2).  | ||||||
|  |  | ||||||
| It is based on Apache Maven, compatible with major IDEs and is using also Spring capabilities for dependency injection. | It is based on Apache Maven, compatible with major IDEs and is using also Spring capabilities for dependency injection. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <organization> |     <organization> | ||||||
| @@ -68,16 +68,6 @@ | |||||||
|                 </exclusion> |                 </exclusion> | ||||||
|             </exclusions> |             </exclusions> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.squareup.okhttp3</groupId> |  | ||||||
|             <artifactId>okhttp</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|     </dependencies> |     </dependencies> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ import java.util.Date; | |||||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException; | import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException; | ||||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException; | import org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException; | ||||||
| import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException; | import org.apache.chemistry.opencmis.commons.exceptions.CmisUnauthorizedException; | ||||||
| import org.apache.commons.lang.time.DateUtils; | import org.apache.commons.lang3.time.DateUtils; | ||||||
| import org.testng.annotations.BeforeClass; | import org.testng.annotations.BeforeClass; | ||||||
| import org.testng.annotations.Test; | import org.testng.annotations.Test; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
| @@ -36,11 +36,6 @@ | |||||||
|             <artifactId>jakarta.mail-api</artifactId> |             <artifactId>jakarta.mail-api</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|     </dependencies> |     </dependencies> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
| @@ -44,18 +44,6 @@ | |||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|  |  | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.squareup.okhttp3</groupId> |  | ||||||
|             <artifactId>okhttp</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|  |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>com.sun.mail</groupId> |             <groupId>com.sun.mail</groupId> | ||||||
|             <artifactId>jakarta.mail</artifactId> |             <artifactId>jakarta.mail</artifactId> | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -8,7 +8,7 @@ | |||||||
|     <parent> |     <parent> | ||||||
|         <groupId>org.alfresco</groupId> |         <groupId>org.alfresco</groupId> | ||||||
|         <artifactId>alfresco-community-repo-tests</artifactId> |         <artifactId>alfresco-community-repo-tests</artifactId> | ||||||
|         <version>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
| @@ -17,7 +17,7 @@ | |||||||
|         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||||||
|         <rest.api.explorer.branch>master</rest.api.explorer.branch> |         <rest.api.explorer.branch>master</rest.api.explorer.branch> | ||||||
|         <httpclient-osgi-version>4.5.6</httpclient-osgi-version> |         <httpclient-osgi-version>4.5.6</httpclient-osgi-version> | ||||||
|         <commons-lang3.version>3.17.0</commons-lang3.version> |         <commons-lang3.version>3.18.0</commons-lang3.version> | ||||||
|         <scribejava-apis.version>8.3.3</scribejava-apis.version> |         <scribejava-apis.version>8.3.3</scribejava-apis.version> | ||||||
|         <java.version>17</java.version> |         <java.version>17</java.version> | ||||||
|     </properties> |     </properties> | ||||||
| @@ -79,18 +79,6 @@ | |||||||
|             <version>${commons-lang3.version}</version> |             <version>${commons-lang3.version}</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|  |  | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.squareup.okhttp3</groupId> |  | ||||||
|             <artifactId>okhttp</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|  |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.awaitility</groupId> |             <groupId>org.awaitility</groupId> | ||||||
|             <artifactId>awaitility</artifactId> |             <artifactId>awaitility</artifactId> | ||||||
| @@ -171,14 +159,14 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.codehaus.groovy</groupId> |             <groupId>org.codehaus.groovy</groupId> | ||||||
|             <artifactId>groovy</artifactId> |             <artifactId>groovy</artifactId> | ||||||
|             <version>3.0.23</version> |             <version>3.0.25</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json--> |         <!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json--> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.codehaus.groovy</groupId> |             <groupId>org.codehaus.groovy</groupId> | ||||||
|             <artifactId>groovy-json</artifactId> |             <artifactId>groovy-json</artifactId> | ||||||
|             <version>3.0.22</version> |             <version>3.0.25</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|        <dependency> |        <dependency> | ||||||
|   | |||||||
| @@ -0,0 +1,95 @@ | |||||||
|  | /* | ||||||
|  |  * #%L | ||||||
|  |  * Alfresco Repository | ||||||
|  |  * %% | ||||||
|  |  * Copyright (C) 2025 - 2025 Alfresco Software Limited | ||||||
|  |  * %% | ||||||
|  |  * This file is part of the Alfresco software. | ||||||
|  |  * If the software was purchased under a paid Alfresco license, the terms of | ||||||
|  |  * the paid license agreement will prevail.  Otherwise, the software is | ||||||
|  |  * provided under the following open source license terms: | ||||||
|  |  * | ||||||
|  |  * Alfresco is free software: you can redistribute it and/or modify | ||||||
|  |  * it under the terms of the GNU Lesser General Public License as published by | ||||||
|  |  * the Free Software Foundation, either version 3 of the License, or | ||||||
|  |  * (at your option) any later version. | ||||||
|  |  * | ||||||
|  |  * Alfresco 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 Lesser General Public License for more details. | ||||||
|  |  * | ||||||
|  |  * You should have received a copy of the GNU Lesser General Public License | ||||||
|  |  * along with Alfresco. If not, see <http://www.gnu.org/licenses/>. | ||||||
|  |  * #L% | ||||||
|  |  */ | ||||||
|  |  | ||||||
|  | package org.alfresco.rest.search; | ||||||
|  |  | ||||||
|  | import static org.testng.Assert.*; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import org.apache.commons.collections.CollectionUtils; | ||||||
|  | import org.springframework.http.HttpStatus; | ||||||
|  | import org.testng.annotations.Test; | ||||||
|  |  | ||||||
|  | import org.alfresco.rest.RestTest; | ||||||
|  | import org.alfresco.rest.model.RestNodeModel; | ||||||
|  | import org.alfresco.utility.RetryOperation; | ||||||
|  | import org.alfresco.utility.Utility; | ||||||
|  | import org.alfresco.utility.model.ContentModel; | ||||||
|  | import org.alfresco.utility.model.FileModel; | ||||||
|  | import org.alfresco.utility.model.TestGroup; | ||||||
|  | import org.alfresco.utility.model.UserModel; | ||||||
|  | import org.alfresco.utility.testrail.ExecutionType; | ||||||
|  | import org.alfresco.utility.testrail.annotation.TestRail; | ||||||
|  |  | ||||||
|  | public class NodeContentTest extends RestTest | ||||||
|  | { | ||||||
|  |  | ||||||
|  |     @TestRail(section = {TestGroup.REST_API, | ||||||
|  |             TestGroup.SEARCH}, executionType = ExecutionType.SANITY, description = "Check basic functionality of GET queries/sites") | ||||||
|  |     @Test(groups = {TestGroup.REST_API, TestGroup.RATINGS, TestGroup.CORE}) | ||||||
|  |     public void testNodeContent() throws Exception | ||||||
|  |     { | ||||||
|  |  | ||||||
|  |         UserModel adminUser = dataContent.getAdminUser(); | ||||||
|  |         final String fileName = "nodecontent.pdf"; | ||||||
|  |         final String term = "babekyrtso"; | ||||||
|  |  | ||||||
|  |         FileModel fileModel = FileModel.getFileModelBasedOnTestDataFile(fileName); | ||||||
|  |         restClient.authenticateUser(adminUser) | ||||||
|  |                 .configureRequestSpec() | ||||||
|  |                 .addMultiPart("filedata", fileModel.toFile()); | ||||||
|  |         RestNodeModel node = restClient.authenticateUser(adminUser).withCoreAPI().usingNode(ContentModel.my()).createNode(); | ||||||
|  |         restClient.assertStatusCodeIs(HttpStatus.CREATED); | ||||||
|  |  | ||||||
|  |         SearchRequest query = new SearchRequest(); | ||||||
|  |         RestRequestQueryModel queryModel = new RestRequestQueryModel(); | ||||||
|  |         queryModel.setLanguage("afts"); | ||||||
|  |         queryModel.setQuery(term); | ||||||
|  |         query.setQuery(queryModel); | ||||||
|  |  | ||||||
|  |         RetryOperation op = () -> { | ||||||
|  |             List<SearchNodeModel> entries = restClient.authenticateUser(adminUser) | ||||||
|  |                     .withSearchAPI() | ||||||
|  |                     .search(query).getEntries(); | ||||||
|  |  | ||||||
|  |             assertFalse(CollectionUtils.isEmpty(entries), "Search results should not be empty"); | ||||||
|  |             boolean fileFound = entries.stream() | ||||||
|  |                     .map(SearchNodeModel::getModel) | ||||||
|  |                     .anyMatch(e -> fileName.equals(e.getName())); | ||||||
|  |             assertTrue(fileFound, "Search results should contain the file: " + fileName); | ||||||
|  |  | ||||||
|  |             restClient.assertStatusCodeIs(HttpStatus.OK); | ||||||
|  |         }; | ||||||
|  |         Utility.sleep(300, 100000, op); | ||||||
|  |  | ||||||
|  |         restClient.authenticateUser(adminUser) | ||||||
|  |                 .withCoreAPI() | ||||||
|  |                 .usingNode(ContentModel.my()) | ||||||
|  |                 .deleteNode(node); | ||||||
|  |         restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								packaging/tests/tas-restapi/src/test/resources/shared-resources/testdata/nodecontent.pdf
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								packaging/tests/tas-restapi/src/test/resources/shared-resources/testdata/nodecontent.pdf
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -15,6 +15,7 @@ | |||||||
|             <package name="org.alfresco.rest.people.*"/> |             <package name="org.alfresco.rest.people.*"/> | ||||||
|             <package name="org.alfresco.rest.queries.*"/> |             <package name="org.alfresco.rest.queries.*"/> | ||||||
|             <package name="org.alfresco.rest.ratings.*"/> |             <package name="org.alfresco.rest.ratings.*"/> | ||||||
|  |             <package name="org.alfresco.rest.search.*"/> | ||||||
|         </packages> |         </packages> | ||||||
|     </test> |     </test> | ||||||
| </suite> | </suite> | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <developers> |     <developers> | ||||||
| @@ -31,11 +31,6 @@ | |||||||
|             <artifactId>webdav</artifactId> |             <artifactId>webdav</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|     </dependencies> |     </dependencies> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
|   | |||||||
							
								
								
									
										96
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										96
									
								
								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>25.2.0.43</version> |     <version>25.3.0.57</version> | ||||||
|     <packaging>pom</packaging> |     <packaging>pom</packaging> | ||||||
|     <name>Alfresco Community Repo Parent</name> |     <name>Alfresco Community Repo Parent</name> | ||||||
|  |  | ||||||
| @@ -24,7 +24,7 @@ | |||||||
|  |  | ||||||
|     <properties> |     <properties> | ||||||
|         <acs.version.major>25</acs.version.major> |         <acs.version.major>25</acs.version.major> | ||||||
|         <acs.version.minor>2</acs.version.minor> |         <acs.version.minor>3</acs.version.minor> | ||||||
|         <acs.version.revision>0</acs.version.revision> |         <acs.version.revision>0</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> | ||||||
| @@ -51,26 +51,26 @@ | |||||||
|         <dependency.alfresco-server-root.version>7.0.2</dependency.alfresco-server-root.version> |         <dependency.alfresco-server-root.version>7.0.2</dependency.alfresco-server-root.version> | ||||||
|         <dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version> |         <dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version> | ||||||
|         <dependency.activiti.version>5.23.0</dependency.activiti.version> |         <dependency.activiti.version>5.23.0</dependency.activiti.version> | ||||||
|         <dependency.alfresco-transform-core.version>5.1.7</dependency.alfresco-transform-core.version> |         <dependency.alfresco-transform-core.version>5.2.2</dependency.alfresco-transform-core.version> | ||||||
|         <dependency.alfresco-transform-service.version>4.1.7</dependency.alfresco-transform-service.version> |         <dependency.alfresco-transform-service.version>4.2.2</dependency.alfresco-transform-service.version> | ||||||
|         <dependency.alfresco-greenmail.version>7.1</dependency.alfresco-greenmail.version> |         <dependency.alfresco-greenmail.version>7.1</dependency.alfresco-greenmail.version> | ||||||
|         <dependency.acs-event-model.version>1.0.2</dependency.acs-event-model.version> |         <dependency.acs-event-model.version>1.0.11</dependency.acs-event-model.version> | ||||||
|  |  | ||||||
|         <dependency.aspectj.version>1.9.22.1</dependency.aspectj.version> |         <dependency.aspectj.version>1.9.22.1</dependency.aspectj.version> | ||||||
|         <dependency.spring.version>6.2.2</dependency.spring.version> |         <dependency.spring.version>6.2.11</dependency.spring.version> | ||||||
|         <dependency.spring-security.version>6.3.9</dependency.spring-security.version> |         <dependency.spring-security.version>6.4.11</dependency.spring-security.version> | ||||||
|         <dependency.antlr.version>3.5.3</dependency.antlr.version> |         <dependency.antlr.version>3.5.3</dependency.antlr.version> | ||||||
|         <dependency.jackson.version>2.17.2</dependency.jackson.version> |         <dependency.jackson.version>2.17.2</dependency.jackson.version> | ||||||
|         <dependency.cxf.version>4.1.0</dependency.cxf.version> |         <dependency.cxf.version>4.1.2</dependency.cxf.version> | ||||||
|         <dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version> |         <dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version> | ||||||
|         <dependency.webscripts.version>10.0</dependency.webscripts.version> |         <dependency.webscripts.version>10.2</dependency.webscripts.version> | ||||||
|         <dependency.bouncycastle.version>1.79</dependency.bouncycastle.version> |         <dependency.bouncycastle.version>1.81</dependency.bouncycastle.version> | ||||||
|         <dependency.mockito-core.version>5.14.1</dependency.mockito-core.version> |         <dependency.mockito-core.version>5.18.0</dependency.mockito-core.version> | ||||||
|         <dependency.assertj.version>3.27.3</dependency.assertj.version> |         <dependency.assertj.version>3.27.3</dependency.assertj.version> | ||||||
|         <dependency.org-json.version>20240303</dependency.org-json.version> |         <dependency.org-json.version>20250517</dependency.org-json.version> | ||||||
|         <dependency.commons-dbcp.version>2.12.0</dependency.commons-dbcp.version> |         <dependency.commons-dbcp.version>2.12.0</dependency.commons-dbcp.version> | ||||||
|         <dependency.commons-io.version>2.18.0</dependency.commons-io.version> |         <dependency.commons-io.version>2.20.0</dependency.commons-io.version> | ||||||
|         <dependency.gson.version>2.12.1</dependency.gson.version> |         <dependency.gson.version>2.13.1</dependency.gson.version> | ||||||
|         <dependency.guava.version>33.3.1-jre</dependency.guava.version> |         <dependency.guava.version>33.3.1-jre</dependency.guava.version> | ||||||
|         <dependency.httpclient.version>4.5.14</dependency.httpclient.version> |         <dependency.httpclient.version>4.5.14</dependency.httpclient.version> | ||||||
|         <dependency.httpcore.version>4.4.16</dependency.httpcore.version> |         <dependency.httpcore.version>4.4.16</dependency.httpcore.version> | ||||||
| @@ -80,9 +80,9 @@ | |||||||
|         <dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version> |         <dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version> | ||||||
|         <dependency.xercesImpl.version>2.12.2</dependency.xercesImpl.version> |         <dependency.xercesImpl.version>2.12.2</dependency.xercesImpl.version> | ||||||
|         <dependency.slf4j.version>2.0.16</dependency.slf4j.version> |         <dependency.slf4j.version>2.0.16</dependency.slf4j.version> | ||||||
|         <dependency.log4j.version>2.24.3</dependency.log4j.version> |         <dependency.log4j.version>2.25.1</dependency.log4j.version> | ||||||
|         <dependency.groovy.version>3.0.23</dependency.groovy.version> |         <dependency.groovy.version>3.0.25</dependency.groovy.version> | ||||||
|         <dependency.tika.version>2.9.2</dependency.tika.version> |         <dependency.tika.version>3.2.3</dependency.tika.version> | ||||||
|         <dependency.truezip.version>7.7.10</dependency.truezip.version> |         <dependency.truezip.version>7.7.10</dependency.truezip.version> | ||||||
|         <dependency.poi.version>5.4.0</dependency.poi.version> |         <dependency.poi.version>5.4.0</dependency.poi.version> | ||||||
|         <dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version> |         <dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version> | ||||||
| @@ -115,19 +115,19 @@ | |||||||
|         <dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version> |         <dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version> | ||||||
|         <dependency.json-smart.version>2.5.2</dependency.json-smart.version> |         <dependency.json-smart.version>2.5.2</dependency.json-smart.version> | ||||||
|         <alfresco.googledrive.version>4.1.0</alfresco.googledrive.version> |         <alfresco.googledrive.version>4.1.0</alfresco.googledrive.version> | ||||||
|         <alfresco.aos-module.version>3.3.0-A1</alfresco.aos-module.version> |         <alfresco.aos-module.version>3.4.0</alfresco.aos-module.version> | ||||||
|         <alfresco.api-explorer.version>25.1.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share --> |         <alfresco.api-explorer.version>25.2.0</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.4.0</license-maven-plugin.version> |         <license-maven-plugin.version>2.4.0</license-maven-plugin.version> | ||||||
|         <spotless-plugin.version>2.44.2</spotless-plugin.version> |         <spotless-plugin.version>2.45.0</spotless-plugin.version> | ||||||
|  |  | ||||||
|         <dependency.postgresql.version>42.7.5</dependency.postgresql.version> |         <dependency.postgresql.version>42.7.5</dependency.postgresql.version> | ||||||
|         <dependency.mysql.version>8.0.30</dependency.mysql.version> |         <dependency.mysql.version>8.0.30</dependency.mysql.version> | ||||||
|         <dependency.mysql-image.version>8</dependency.mysql-image.version> |         <dependency.mysql-image.version>8</dependency.mysql-image.version> | ||||||
|         <dependency.mariadb.version>2.7.4</dependency.mariadb.version> |         <dependency.mariadb.version>2.7.4</dependency.mariadb.version> | ||||||
|         <dependency.tas-utility.version>5.0.2</dependency.tas-utility.version> |         <dependency.tas-utility.version>5.0.2</dependency.tas-utility.version> | ||||||
|         <dependency.rest-assured.version>5.5.0</dependency.rest-assured.version> |         <dependency.rest-assured.version>5.5.5</dependency.rest-assured.version> | ||||||
|         <dependency.tas-email.version>2.0.0</dependency.tas-email.version> |         <dependency.tas-email.version>2.0.0</dependency.tas-email.version> | ||||||
|         <dependency.tas-webdav.version>1.21</dependency.tas-webdav.version> |         <dependency.tas-webdav.version>1.21</dependency.tas-webdav.version> | ||||||
|         <dependency.tas-ftp.version>1.19</dependency.tas-ftp.version> |         <dependency.tas-ftp.version>1.19</dependency.tas-ftp.version> | ||||||
| @@ -154,7 +154,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>25.2.0.43</tag> |         <tag>25.3.0.57</tag> | ||||||
|     </scm> |     </scm> | ||||||
|  |  | ||||||
|     <distributionManagement> |     <distributionManagement> | ||||||
| @@ -170,6 +170,12 @@ | |||||||
|  |  | ||||||
|     <dependencyManagement> |     <dependencyManagement> | ||||||
|         <dependencies> |         <dependencies> | ||||||
|  |             <!-- v1.10 has 0BSD license it must be consulted with Legal --> | ||||||
|  |             <dependency> | ||||||
|  |                 <groupId>org.tukaani</groupId> | ||||||
|  |                 <artifactId>xz</artifactId> | ||||||
|  |                 <version>1.9</version> | ||||||
|  |             </dependency> | ||||||
|             <!-- Jakarta... --> |             <!-- Jakarta... --> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>jakarta.xml.bind</groupId> |                 <groupId>jakarta.xml.bind</groupId> | ||||||
| @@ -409,12 +415,12 @@ | |||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>commons-logging</groupId> |                 <groupId>commons-logging</groupId> | ||||||
|                 <artifactId>commons-logging</artifactId> |                 <artifactId>commons-logging</artifactId> | ||||||
|                 <version>1.3.3</version> |                 <version>1.3.5</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>commons-beanutils</groupId> |                 <groupId>commons-beanutils</groupId> | ||||||
|                 <artifactId>commons-beanutils</artifactId> |                 <artifactId>commons-beanutils</artifactId> | ||||||
|                 <version>1.9.4</version> |                 <version>1.11.0</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>commons-codec</groupId> |                 <groupId>commons-codec</groupId> | ||||||
| @@ -422,9 +428,9 @@ | |||||||
|                 <version>1.18.0</version> |                 <version>1.18.0</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>commons-lang</groupId> |                 <groupId>org.apache.commons</groupId> | ||||||
|                 <artifactId>commons-lang</artifactId> |                 <artifactId>commons-lang3</artifactId> | ||||||
|                 <version>2.6</version> |                 <version>3.18.0</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>commons-io</groupId> |                 <groupId>commons-io</groupId> | ||||||
| @@ -444,8 +450,8 @@ | |||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>org.apache.commons</groupId> |                 <groupId>org.apache.commons</groupId> | ||||||
|                 <artifactId>commons-fileupload2-jakarta</artifactId> |                 <artifactId>commons-fileupload2-jakarta-servlet6</artifactId> | ||||||
|                 <version>2.0.0-M1</version> |                 <version>2.0.0-M4</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>commons-net</groupId> |                 <groupId>commons-net</groupId> | ||||||
| @@ -708,13 +714,13 @@ | |||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>com.networknt</groupId> |                 <groupId>com.networknt</groupId> | ||||||
|                 <artifactId>json-schema-validator</artifactId> |                 <artifactId>json-schema-validator</artifactId> | ||||||
|                 <version>1.5.5</version> |                 <version>1.5.8</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <!-- upgrade dependency from TIKA --> |             <!-- upgrade dependency from TIKA --> | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>org.jsoup</groupId> |                 <groupId>org.jsoup</groupId> | ||||||
|                 <artifactId>jsoup</artifactId> |                 <artifactId>jsoup</artifactId> | ||||||
|                 <version>1.18.1</version> |                 <version>1.21.1</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <!-- upgrade dependency from TIKA --> |             <!-- upgrade dependency from TIKA --> | ||||||
|             <dependency> |             <dependency> | ||||||
| @@ -798,7 +804,7 @@ | |||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>joda-time</groupId> |                 <groupId>joda-time</groupId> | ||||||
|                 <artifactId>joda-time</artifactId> |                 <artifactId>joda-time</artifactId> | ||||||
|                 <version>2.13.1</version> |                 <version>2.14.0</version> | ||||||
|             </dependency> |             </dependency> | ||||||
|  |  | ||||||
|             <!-- provided dependencies --> |             <!-- provided dependencies --> | ||||||
| @@ -828,18 +834,6 @@ | |||||||
|                 <version>4.13.2</version> |                 <version>4.13.2</version> | ||||||
|                 <scope>test</scope> |                 <scope>test</scope> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |  | ||||||
|                 <groupId>com.epam.reportportal</groupId> |  | ||||||
|                 <artifactId>agent-java-testng</artifactId> |  | ||||||
|                 <version>5.4.0</version> |  | ||||||
|                 <scope>test</scope> |  | ||||||
|             </dependency> |  | ||||||
|             <dependency> |  | ||||||
|                 <groupId>com.squareup.okhttp3</groupId> |  | ||||||
|                 <artifactId>okhttp</artifactId> |  | ||||||
|                 <version>4.12.0</version> |  | ||||||
|                 <scope>test</scope> |  | ||||||
|             </dependency> |  | ||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>org.antlr</groupId> |                 <groupId>org.antlr</groupId> | ||||||
|                 <artifactId>gunit</artifactId> |                 <artifactId>gunit</artifactId> | ||||||
| @@ -955,7 +949,7 @@ | |||||||
|             <dependency> |             <dependency> | ||||||
|                 <groupId>org.projectlombok</groupId> |                 <groupId>org.projectlombok</groupId> | ||||||
|                 <artifactId>lombok</artifactId> |                 <artifactId>lombok</artifactId> | ||||||
|                 <version>1.18.36</version> |                 <version>1.18.38</version> | ||||||
|                 <scope>provided</scope> |                 <scope>provided</scope> | ||||||
|             </dependency> |             </dependency> | ||||||
|             <dependency> |             <dependency> | ||||||
| @@ -1012,7 +1006,7 @@ | |||||||
|                 <plugin> |                 <plugin> | ||||||
|                     <groupId>io.fabric8</groupId> |                     <groupId>io.fabric8</groupId> | ||||||
|                     <artifactId>docker-maven-plugin</artifactId> |                     <artifactId>docker-maven-plugin</artifactId> | ||||||
|                     <version>0.45.0</version> |                     <version>0.46.0</version> | ||||||
|                 </plugin> |                 </plugin> | ||||||
|                 <plugin> |                 <plugin> | ||||||
|                     <artifactId>maven-surefire-plugin</artifactId> |                     <artifactId>maven-surefire-plugin</artifactId> | ||||||
| @@ -1093,7 +1087,7 @@ | |||||||
|                 <plugin> |                 <plugin> | ||||||
|                     <groupId>org.codehaus.cargo</groupId> |                     <groupId>org.codehaus.cargo</groupId> | ||||||
|                     <artifactId>cargo-maven3-plugin</artifactId> |                     <artifactId>cargo-maven3-plugin</artifactId> | ||||||
|                     <version>1.10.16</version> |                     <version>1.10.20</version> | ||||||
|                 </plugin> |                 </plugin> | ||||||
|                 <plugin> |                 <plugin> | ||||||
|                     <groupId>org.apache.maven.plugins</groupId> |                     <groupId>org.apache.maven.plugins</groupId> | ||||||
| @@ -1137,16 +1131,10 @@ | |||||||
|                                             <exclude>jakarta.xml.soap:jakarta.xml.soap-api:(, 2.0.1)</exclude> |                                             <exclude>jakarta.xml.soap:jakarta.xml.soap-api:(, 2.0.1)</exclude> | ||||||
|                                             <exclude>jakarta.jws:jakarta.jws-api:(, 3.0.0)</exclude> |                                             <exclude>jakarta.jws:jakarta.jws-api:(, 3.0.0)</exclude> | ||||||
| <!--                                            Enforce ban bouncycastle dependencies other than specified under <includes> section--> | <!--                                            Enforce ban bouncycastle dependencies other than specified under <includes> section--> | ||||||
|                                             <exclude>org.bouncycastle</exclude> |                                             <exclude>org.bouncycastle:(,1.81)</exclude> | ||||||
| <!--                                            Enforce one version of Jaxb--> | <!--                                            Enforce one version of Jaxb--> | ||||||
|                                             <exclude>com.sun.xml.bind</exclude> |                                             <exclude>com.sun.xml.bind</exclude> | ||||||
|                                         </excludes> |                                         </excludes> | ||||||
|                                         <includes> |  | ||||||
|                                             <include>org.bouncycastle:bcprov-jdk18on:[1.78.1,)</include> |  | ||||||
|                                             <include>org.bouncycastle:bcmail-jdk18on:[1.78.1,)</include> |  | ||||||
|                                             <include>org.bouncycastle:bcpkix-jdk18on:[1.78.1,)</include> |  | ||||||
|                                             <include>org.bouncycastle:bcutil-jdk18on:[1.78.1,)</include> |  | ||||||
|                                         </includes> |  | ||||||
|                                     </bannedDependencies> |                                     </bannedDependencies> | ||||||
|                                 </rules> |                                 </rules> | ||||||
|                                 <fail>true</fail> |                                 <fail>true</fail> | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
| @@ -45,7 +45,7 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.apache.santuario</groupId> |             <groupId>org.apache.santuario</groupId> | ||||||
|             <artifactId>xmlsec</artifactId> |             <artifactId>xmlsec</artifactId> | ||||||
|             <version>4.0.3</version> |             <version>4.0.4</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <!-- newer version, see REPO-3133 --> |         <!-- newer version, see REPO-3133 --> | ||||||
|         <dependency> |         <dependency> | ||||||
| @@ -66,11 +66,6 @@ | |||||||
|             <artifactId>junit</artifactId> |             <artifactId>junit</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.mockito</groupId> |             <groupId>org.mockito</groupId> | ||||||
|             <artifactId>mockito-core</artifactId> |             <artifactId>mockito-core</artifactId> | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ import jakarta.servlet.http.HttpServletRequest; | |||||||
|  |  | ||||||
| import org.apache.commons.fileupload2.core.FileItemInput; | import org.apache.commons.fileupload2.core.FileItemInput; | ||||||
| import org.apache.commons.fileupload2.core.FileItemInputIterator; | import org.apache.commons.fileupload2.core.FileItemInputIterator; | ||||||
| import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload; | import org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload; | ||||||
| import org.apache.commons.logging.Log; | import org.apache.commons.logging.Log; | ||||||
| import org.apache.commons.logging.LogFactory; | import org.apache.commons.logging.LogFactory; | ||||||
| import org.springframework.extensions.webscripts.Status; | import org.springframework.extensions.webscripts.Status; | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ import jakarta.servlet.http.HttpServletRequest; | |||||||
|  |  | ||||||
| import org.apache.commons.fileupload2.core.FileItemInput; | import org.apache.commons.fileupload2.core.FileItemInput; | ||||||
| import org.apache.commons.fileupload2.core.FileItemInputIterator; | import org.apache.commons.fileupload2.core.FileItemInputIterator; | ||||||
| import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload; | import org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload; | ||||||
| import org.apache.commons.logging.Log; | import org.apache.commons.logging.Log; | ||||||
| import org.apache.commons.logging.LogFactory; | import org.apache.commons.logging.LogFactory; | ||||||
| import org.springframework.extensions.webscripts.Status; | import org.springframework.extensions.webscripts.Status; | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ | |||||||
|  * #%L |  * #%L | ||||||
|  * Alfresco Remote API |  * Alfresco Remote API | ||||||
|  * %% |  * %% | ||||||
|  * Copyright (C) 2005 - 2016 Alfresco Software Limited |  * Copyright (C) 2005 - 2025 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 | ||||||
| @@ -38,14 +38,19 @@ import java.util.Collections; | |||||||
| import java.util.Comparator; | import java.util.Comparator; | ||||||
| import java.util.HashMap; | import java.util.HashMap; | ||||||
| import java.util.Iterator; | import java.util.Iterator; | ||||||
|  | import java.util.LinkedHashMap; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  | import java.util.Set; | ||||||
|  |  | ||||||
|  | import org.apache.commons.logging.Log; | ||||||
|  | import org.apache.commons.logging.LogFactory; | ||||||
| import org.springframework.beans.factory.InitializingBean; | import org.springframework.beans.factory.InitializingBean; | ||||||
| import org.springframework.extensions.surf.util.I18NUtil; | import org.springframework.extensions.surf.util.I18NUtil; | ||||||
|  |  | ||||||
| import org.alfresco.model.ContentModel; | import org.alfresco.model.ContentModel; | ||||||
| import org.alfresco.query.PagingRequest; | import org.alfresco.query.PagingRequest; | ||||||
|  | import org.alfresco.repo.security.permissions.AccessDeniedException; | ||||||
| import org.alfresco.repo.site.SiteModel; | import org.alfresco.repo.site.SiteModel; | ||||||
| import org.alfresco.rest.api.Nodes; | import org.alfresco.rest.api.Nodes; | ||||||
| import org.alfresco.rest.api.People; | import org.alfresco.rest.api.People; | ||||||
| @@ -89,6 +94,7 @@ import org.alfresco.util.SearchLanguageConversion; | |||||||
|  */ |  */ | ||||||
| public class QueriesImpl implements Queries, InitializingBean | public class QueriesImpl implements Queries, InitializingBean | ||||||
| { | { | ||||||
|  |     private static final Log LOGGER = LogFactory.getLog(QueriesImpl.class); | ||||||
|     private final static Map<String, QName> NODE_SORT_PARAMS_TO_QNAMES = sortParamsToQNames( |     private final static Map<String, QName> NODE_SORT_PARAMS_TO_QNAMES = sortParamsToQNames( | ||||||
|             PARAM_NAME, ContentModel.PROP_NAME, |             PARAM_NAME, ContentModel.PROP_NAME, | ||||||
|             PARAM_CREATEDAT, ContentModel.PROP_CREATED, |             PARAM_CREATEDAT, ContentModel.PROP_CREATED, | ||||||
| @@ -247,7 +253,7 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|                             { |                             { | ||||||
|                                 // first request for this namespace prefix, get and cache result |                                 // first request for this namespace prefix, get and cache result | ||||||
|                                 Collection<String> prefixes = namespaceService.getPrefixes(qname.getNamespaceURI()); |                                 Collection<String> prefixes = namespaceService.getPrefixes(qname.getNamespaceURI()); | ||||||
|                                 prefix = prefixes.size() != 0 ? prefixes.iterator().next() : ""; |                                 prefix = !prefixes.isEmpty() ? prefixes.iterator().next() : ""; | ||||||
|                                 cache.put(qname.getNamespaceURI(), prefix); |                                 cache.put(qname.getNamespaceURI(), prefix); | ||||||
|                             } |                             } | ||||||
|                             buf.append('/').append(prefix).append(':').append(ISO9075.encode(qname.getLocalName())); |                             buf.append('/').append(prefix).append(':').append(ISO9075.encode(qname.getLocalName())); | ||||||
| @@ -261,12 +267,6 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|                 return buf.toString(); |                 return buf.toString(); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             @Override |  | ||||||
|             protected List<Node> newList(int capacity) |  | ||||||
|             { |  | ||||||
|                 return new ArrayList<Node>(capacity); |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|             @Override |             @Override | ||||||
|             protected Node convert(NodeRef nodeRef, List<String> includeParam) |             protected Node convert(NodeRef nodeRef, List<String> includeParam) | ||||||
|             { |             { | ||||||
| @@ -303,18 +303,11 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|                 query.append("*\")"); |                 query.append("*\")"); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             @Override |  | ||||||
|             protected List<Person> newList(int capacity) |  | ||||||
|             { |  | ||||||
|                 return new ArrayList<Person>(capacity); |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|             @Override |             @Override | ||||||
|             protected Person convert(NodeRef nodeRef, List<String> includeParam) |             protected Person convert(NodeRef nodeRef, List<String> includeParam) | ||||||
|             { |             { | ||||||
|                 String personId = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME); |                 String personId = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME); | ||||||
|                 Person person = people.getPerson(personId); |                 return people.getPerson(personId); | ||||||
|                 return person; |  | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             // TODO Do the sort in the query on day. A comment in the code for the V0 API used for live people |             // TODO Do the sort in the query on day. A comment in the code for the V0 API used for live people | ||||||
| @@ -341,28 +334,18 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|                 query.append("*\")"); |                 query.append("*\")"); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             @Override |  | ||||||
|             protected List<Site> newList(int capacity) |  | ||||||
|             { |  | ||||||
|                 return new ArrayList<>(capacity); |  | ||||||
|             } |  | ||||||
|  |  | ||||||
|             @Override |             @Override | ||||||
|             protected Site convert(NodeRef nodeRef, List<String> includeParam) |             protected Site convert(NodeRef nodeRef, List<String> includeParam) | ||||||
|             { |             { | ||||||
|                 return getSite(siteService.getSite(nodeRef), true); |                 return getSite(siteService.getSite(nodeRef)); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             // note: see also Sites.getSite |             // note: see also Sites.getSite | ||||||
|             private Site getSite(SiteInfo siteInfo, boolean includeRole) |             private Site getSite(SiteInfo siteInfo) | ||||||
|             { |             { | ||||||
|                 // set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url) |                 // set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url) | ||||||
|                 String siteId = siteInfo.getShortName(); |                 String siteId = siteInfo.getShortName(); | ||||||
|                 String role = null; |                 String role = sites.getSiteRole(siteId); | ||||||
|                 if (includeRole) |  | ||||||
|                 { |  | ||||||
|                     role = sites.getSiteRole(siteId); |  | ||||||
|                 } |  | ||||||
|                 return new Site(siteInfo, role); |                 return new Site(siteInfo, role); | ||||||
|             } |             } | ||||||
|         }.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", POST_QUERY_SORT, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true)); |         }.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", POST_QUERY_SORT, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true)); | ||||||
| @@ -412,34 +395,38 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             ResultSet queryResults = null; |             ResultSet queryResults = null; | ||||||
|             List<T> collection = null; |  | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 queryResults = searchService.query(sp); |                 queryResults = searchService.query(sp); | ||||||
|  |  | ||||||
|                 List<NodeRef> nodeRefs = queryResults.getNodeRefs(); |                 List<NodeRef> nodeRefs = queryResults.getNodeRefs(); | ||||||
|  |                 Map<NodeRef, T> collection = new LinkedHashMap<>(nodeRefs.size()); | ||||||
|                 if (sort == POST_QUERY_SORT) |  | ||||||
|                 { |  | ||||||
|                     nodeRefs = postQuerySort(parameters, sortParamsToQNames, defaultSortCols, nodeRefs); |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 collection = newList(nodeRefs.size()); |  | ||||||
|                 List<String> includeParam = parameters.getInclude(); |                 List<String> includeParam = parameters.getInclude(); | ||||||
|  |  | ||||||
|                 for (NodeRef nodeRef : nodeRefs) |                 for (NodeRef nodeRef : nodeRefs) | ||||||
|  |                 { | ||||||
|  |                     try | ||||||
|                     { |                     { | ||||||
|                         T t = convert(nodeRef, includeParam); |                         T t = convert(nodeRef, includeParam); | ||||||
|                     collection.add(t); |                         collection.put(nodeRef, t); | ||||||
|  |                     } | ||||||
|  |                     catch (AccessDeniedException ade) | ||||||
|  |                     { | ||||||
|  |                         LOGGER.debug("Ignoring search result for nodeRef " + nodeRef + " due to access denied exception", ade); | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 if (sort == POST_QUERY_SORT) |                 if (sort == POST_QUERY_SORT) | ||||||
|                 { |                 { | ||||||
|                     return listPage(collection, paging); |                     List<T> postQuerySortedCollection = postQuerySort(parameters, sortParamsToQNames, defaultSortCols, collection.keySet()) | ||||||
|  |                             .stream() | ||||||
|  |                             .map(collection::get) | ||||||
|  |                             .toList(); | ||||||
|  |                     return listPage(postQuerySortedCollection, paging); | ||||||
|                 } |                 } | ||||||
|                 else |                 else | ||||||
|                 { |                 { | ||||||
|                     return CollectionWithPagingInfo.asPaged(paging, collection, queryResults.hasMore(), Long.valueOf(queryResults.getNumberFound()).intValue()); |                     return CollectionWithPagingInfo.asPaged(paging, collection.values(), queryResults.hasMore(), Long.valueOf(queryResults.getNumberFound()).intValue()); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             finally |             finally | ||||||
| @@ -464,15 +451,6 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|          */ |          */ | ||||||
|         protected abstract void buildQuery(StringBuilder query, String term, SearchParameters sp, String queryTemplateName); |         protected abstract void buildQuery(StringBuilder query, String term, SearchParameters sp, String queryTemplateName); | ||||||
|  |  | ||||||
|         /** |  | ||||||
|          * Returns a list of the correct type. |  | ||||||
|          *  |  | ||||||
|          * @param capacity |  | ||||||
|          *            of the list |  | ||||||
|          * @return a new list. |  | ||||||
|          */ |  | ||||||
|         protected abstract List<T> newList(int capacity); |  | ||||||
|  |  | ||||||
|         /** |         /** | ||||||
|          * Converts a nodeRef into the an object of the required type. |          * Converts a nodeRef into the an object of the required type. | ||||||
|          *  |          *  | ||||||
| @@ -551,7 +529,7 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|         private List<SortColumn> getSorting(Parameters parameters, List<SortColumn> defaultSortCols) |         private List<SortColumn> getSorting(Parameters parameters, List<SortColumn> defaultSortCols) | ||||||
|         { |         { | ||||||
|             List<SortColumn> sortCols = parameters.getSorting(); |             List<SortColumn> sortCols = parameters.getSorting(); | ||||||
|             if (sortCols == null || sortCols.size() == 0) |             if (sortCols == null || sortCols.isEmpty()) | ||||||
|             { |             { | ||||||
|                 sortCols = defaultSortCols == null ? Collections.emptyList() : defaultSortCols; |                 sortCols = defaultSortCols == null ? Collections.emptyList() : defaultSortCols; | ||||||
|             } |             } | ||||||
| @@ -559,14 +537,18 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         protected List<NodeRef> postQuerySort(Parameters parameters, Map<String, QName> sortParamsToQNames, |         protected List<NodeRef> postQuerySort(Parameters parameters, Map<String, QName> sortParamsToQNames, | ||||||
|                 List<SortColumn> defaultSortCols, List<NodeRef> nodeRefs) |                 List<SortColumn> defaultSortCols, Set<NodeRef> unsortedNodeRefs) | ||||||
|         { |         { | ||||||
|             final List<SortColumn> sortCols = getSorting(parameters, defaultSortCols); |             final List<SortColumn> sortCols = getSorting(parameters, defaultSortCols); | ||||||
|             int sortColCount = sortCols.size(); |             int sortColCount = sortCols.size(); | ||||||
|             if (sortColCount > 0) |  | ||||||
|  |             if (sortColCount == 0) | ||||||
|             { |             { | ||||||
|  |                 return new ArrayList<>(unsortedNodeRefs); | ||||||
|  |             } | ||||||
|  |  | ||||||
|             // make copy of nodeRefs because it can be unmodifiable list. |             // make copy of nodeRefs because it can be unmodifiable list. | ||||||
|                 nodeRefs = new ArrayList<NodeRef>(nodeRefs); |             List<NodeRef> sortedNodeRefs = new ArrayList<>(unsortedNodeRefs); | ||||||
|  |  | ||||||
|             List<QName> sortPropQNames = new ArrayList<>(sortColCount); |             List<QName> sortPropQNames = new ArrayList<>(sortColCount); | ||||||
|             for (SortColumn sortCol : sortCols) |             for (SortColumn sortCol : sortCols) | ||||||
| @@ -580,7 +562,7 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             final Collator col = AlfrescoCollator.getInstance(I18NUtil.getLocale()); |             final Collator col = AlfrescoCollator.getInstance(I18NUtil.getLocale()); | ||||||
|                 Collections.sort(nodeRefs, new Comparator<NodeRef>() { |             Collections.sort(sortedNodeRefs, new Comparator<NodeRef>() { | ||||||
|                 @Override |                 @Override | ||||||
|                 public int compare(NodeRef n1, NodeRef n2) |                 public int compare(NodeRef n1, NodeRef n2) | ||||||
|                 { |                 { | ||||||
| @@ -613,8 +595,8 @@ public class QueriesImpl implements Queries, InitializingBean | |||||||
|                 } |                 } | ||||||
|  |  | ||||||
|             }); |             }); | ||||||
|             } |  | ||||||
|             return nodeRefs; |             return sortedNodeRefs; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // note: see also AbstractNodeRelation |         // note: see also AbstractNodeRelation | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ package org.alfresco.rest.framework.resource.parameters; | |||||||
|  |  | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| import org.apache.poi.ss.formula.functions.T; |  | ||||||
| import org.springframework.extensions.webscripts.WebScriptRequest; | import org.springframework.extensions.webscripts.WebScriptRequest; | ||||||
|  |  | ||||||
| import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException; | import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException; | ||||||
| @@ -69,7 +68,7 @@ public interface Parameters | |||||||
|      * @return The Parameter value |      * @return The Parameter value | ||||||
|      * @throws InvalidArgumentException |      * @throws InvalidArgumentException | ||||||
|      */ |      */ | ||||||
|     T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException; |     <T> T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Returns a representation of the Paging of collections of resources, with skip count and max items. See {@link Paging} Specified by the "skipCount" and "maxItems" request parameters. |      * Returns a representation of the Paging of collections of resources, with skip count and max items. See {@link Paging} Specified by the "skipCount" and "maxItems" request parameters. | ||||||
|   | |||||||
| @@ -31,7 +31,6 @@ import java.util.List; | |||||||
| import java.util.Map; | import java.util.Map; | ||||||
|  |  | ||||||
| import org.apache.commons.beanutils.ConvertUtils; | import org.apache.commons.beanutils.ConvertUtils; | ||||||
| import org.apache.poi.ss.formula.functions.T; |  | ||||||
| import org.springframework.extensions.webscripts.WebScriptRequest; | import org.springframework.extensions.webscripts.WebScriptRequest; | ||||||
|  |  | ||||||
| import org.alfresco.repo.content.MimetypeMap; | import org.alfresco.repo.content.MimetypeMap; | ||||||
| @@ -231,7 +230,7 @@ public class Params implements Parameters | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException |     public <T> T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException | ||||||
|     { |     { | ||||||
|         String param = getParameter(parameterName); |         String param = getParameter(parameterName); | ||||||
|         if (param == null) |         if (param == null) | ||||||
| @@ -239,7 +238,7 @@ public class Params implements Parameters | |||||||
|         Object obj = ConvertUtils.convert(param, clazz); |         Object obj = ConvertUtils.convert(param, clazz); | ||||||
|         if (obj != null && obj.getClass().equals(clazz)) |         if (obj != null && obj.getClass().equals(clazz)) | ||||||
|         { |         { | ||||||
|             return (T) obj; |             return clazz.cast(obj); | ||||||
|         } |         } | ||||||
|         throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID, new Object[]{parameterName}); |         throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID, new Object[]{parameterName}); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Admin Console | admin-console.header=Admin Console | ||||||
| admin-console.help=Help | admin-console.help=Help | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Successfully saved values. | admin-console.success=Successfully saved values. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Konzole pro spr\u00e1vce | admin-console.header=Konzole pro spr\u00e1vce | ||||||
| admin-console.help=N\u00e1pov\u011bda | admin-console.help=N\u00e1pov\u011bda | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Hodnoty byly \u00fasp\u011b\u0161n\u011b ulo\u017eeny. | admin-console.success=Hodnoty byly \u00fasp\u011b\u0161n\u011b ulo\u017eeny. | ||||||
|  |  | ||||||
| admin-console.host=Hostitel | admin-console.host=Hostitel | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Administrationskonsol | admin-console.header=Administrationskonsol | ||||||
| admin-console.help=Hj\u00e6lp | admin-console.help=Hj\u00e6lp | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=V\u00e6rdierne blev gemt. | admin-console.success=V\u00e6rdierne blev gemt. | ||||||
|  |  | ||||||
| admin-console.host=V\u00e6rt | admin-console.host=V\u00e6rt | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Administratorkonsole | admin-console.header=Administratorkonsole | ||||||
| admin-console.help=Hilfe | admin-console.help=Hilfe | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Erfolgreich gespeicherte Werte. | admin-console.success=Erfolgreich gespeicherte Werte. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Consola de administraci\u00f3n | admin-console.header=Consola de administraci\u00f3n | ||||||
| admin-console.help=Ayuda | admin-console.help=Ayuda | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Valores guardados correctamente. | admin-console.success=Valores guardados correctamente. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Hallintakonsoli | admin-console.header=Hallintakonsoli | ||||||
| admin-console.help=Ohje | admin-console.help=Ohje | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Arvot tallennettiin. | admin-console.success=Arvot tallennettiin. | ||||||
|  |  | ||||||
| admin-console.host=Is\u00e4nt\u00e4 | admin-console.host=Is\u00e4nt\u00e4 | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Console d'administration | admin-console.header=Console d'administration | ||||||
| admin-console.help=Aide | admin-console.help=Aide | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Les valeurs ont bien \u00e9t\u00e9 enregistr\u00e9es. | admin-console.success=Les valeurs ont bien \u00e9t\u00e9 enregistr\u00e9es. | ||||||
|  |  | ||||||
| admin-console.host=H\u00f4te | admin-console.host=H\u00f4te | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Console di amministrazione | admin-console.header=Console di amministrazione | ||||||
| admin-console.help=Aiuto | admin-console.help=Aiuto | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=I valori sono stati salvati. | admin-console.success=I valori sono stati salvati. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb | admin-console.header=\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb | ||||||
| admin-console.help=\u30d8\u30eb\u30d7 | admin-console.help=\u30d8\u30eb\u30d7 | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=\u5024\u3092\u6b63\u5e38\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002 | admin-console.success=\u5024\u3092\u6b63\u5e38\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002 | ||||||
|  |  | ||||||
| admin-console.host=\u30db\u30b9\u30c8 | admin-console.host=\u30db\u30b9\u30c8 | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Admin-konsoll | admin-console.header=Admin-konsoll | ||||||
| admin-console.help=Hjelp | admin-console.help=Hjelp | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Verdier som ble lagret. | admin-console.success=Verdier som ble lagret. | ||||||
|  |  | ||||||
| admin-console.host=Vert | admin-console.host=Vert | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Beheerconsole | admin-console.header=Beheerconsole | ||||||
| admin-console.help=Help | admin-console.help=Help | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Waarden zijn opgeslagen. | admin-console.success=Waarden zijn opgeslagen. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Konsola administracyjna | admin-console.header=Konsola administracyjna | ||||||
| admin-console.help=Pomoc | admin-console.help=Pomoc | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Warto\u015bci zosta\u0142y zapisane pomy\u015blnie. | admin-console.success=Warto\u015bci zosta\u0142y zapisane pomy\u015blnie. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Console de administra\u00e7\u00e3o | admin-console.header=Console de administra\u00e7\u00e3o | ||||||
| admin-console.help=Ajuda | admin-console.help=Ajuda | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=Valores salvos com sucesso. | admin-console.success=Valores salvos com sucesso. | ||||||
|  |  | ||||||
| admin-console.host=Host | admin-console.host=Host | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 | admin-console.header=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 | ||||||
| admin-console.help=\u0421\u043f\u0440\u0430\u0432\u043a\u0430 | admin-console.help=\u0421\u043f\u0440\u0430\u0432\u043a\u0430 | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. | admin-console.success=\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. | ||||||
|  |  | ||||||
| admin-console.host=\u0425\u043e\u0441\u0442 | admin-console.host=\u0425\u043e\u0441\u0442 | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=Admin-konsol | admin-console.header=Admin-konsol | ||||||
| admin-console.help=Hj\u00e4lp | admin-console.help=Hj\u00e4lp | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=V\u00e4rden sparades. | admin-console.success=V\u00e4rden sparades. | ||||||
|  |  | ||||||
| admin-console.host=V\u00e4rd | admin-console.host=V\u00e4rd | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # I18N messages for the Repository Admin Console | # I18N messages for the Repository Admin Console | ||||||
| admin-console.header=\u7ba1\u7406\u63a7\u5236\u53f0 | admin-console.header=\u7ba1\u7406\u63a7\u5236\u53f0 | ||||||
| admin-console.help=\u5e2e\u52a9 | admin-console.help=\u5e2e\u52a9 | ||||||
| admin-console.help-link=https://support.hyland.com/p/alfresco | admin-console.help-link-topic=qvs1720602310678 | ||||||
| admin-console.success=\u5df2\u6210\u529f\u4fdd\u5b58\u7684\u503c\u3002 | admin-console.success=\u5df2\u6210\u529f\u4fdd\u5b58\u7684\u503c\u3002 | ||||||
|  |  | ||||||
| admin-console.host=\u4e3b\u673a | admin-console.host=\u4e3b\u673a | ||||||
|   | |||||||
| @@ -554,7 +554,7 @@ Admin.addEventListener(window, 'load', function() { | |||||||
|  |  | ||||||
|       <div class="header"> |       <div class="header"> | ||||||
|          <span><a href="${url.serviceContext}${DEFAULT_CONTROLLER!"/admin"}">${msg("admin-console.header")}</a></span><#if metadata??><span class="meta">${HOSTNAME}</span><span class="meta">${HOSTADDR}</span></#if> |          <span><a href="${url.serviceContext}${DEFAULT_CONTROLLER!"/admin"}">${msg("admin-console.header")}</a></span><#if metadata??><span class="meta">${HOSTNAME}</span><span class="meta">${HOSTADDR}</span></#if> | ||||||
|          <div style="float:right"><a href="${msg("admin-console.help-link", docsEdition)}" target="_blank">${msg("admin-console.help")}</a></div> |          <div style="float:right"><a href="${documentationUrl(msg("admin-console.help-link-topic"),"&component=Alfresco%20Content%20Services")}" target="_blank">${msg("admin-console.help")}</a></div> | ||||||
|       </div> |       </div> | ||||||
|        |        | ||||||
|       <div class="navigation-wrapper"> |       <div class="navigation-wrapper"> | ||||||
|   | |||||||
| @@ -51,6 +51,14 @@ function main() | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     var contentChanged = false; | ||||||
|  |     if (itemKind === "node") { | ||||||
|  |         contentChanged = metadataExtractAction.isContentChanged(itemId,repoFormData); | ||||||
|  |     } | ||||||
|  |     if(logger.isLoggingEnabled() && contentChanged) { | ||||||
|  |         logger.log("Content has been changed"); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     var persistedObject = null; |     var persistedObject = null; | ||||||
|     try |     try | ||||||
|     { |     { | ||||||
| @@ -83,9 +91,50 @@ function main() | |||||||
|         |         | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
|  |     if (itemKind === "node") { | ||||||
|  |         checkAndExtractNodeMetadata(persistedObject, itemId, contentChanged); | ||||||
|  |     } | ||||||
|      |      | ||||||
|     model.persistedObject = persistedObject.toString(); |     model.persistedObject = persistedObject.toString(); | ||||||
|     model.message = "Successfully persisted form for item [" + itemKind + "]" + itemId; |     model.message = "Successfully persisted form for item [" + itemKind + "]" + itemId; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | function checkAndExtractNodeMetadata(persistedObject, itemId, isContentChanged) { | ||||||
|  |     var nodeRefStr = toNodeRefString(persistedObject, itemId); | ||||||
|  |     var node = search.findNode(nodeRefStr); | ||||||
|  |  | ||||||
|  |     if (node == null) { | ||||||
|  |         if (logger.isLoggingEnabled()) { | ||||||
|  |             logger.log("Node not found: " + nodeRefStr); | ||||||
|  |         } | ||||||
|  |     } else if(isContentChanged) { | ||||||
|  |         extractMetadata(node, isContentChanged); | ||||||
|  |     } else { | ||||||
|  |         if (logger.isLoggingEnabled()) { | ||||||
|  |             logger.log("Content not changed, skipping metadata extraction for node: " + nodeRefStr); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | function extractMetadata(file, isContentChanged) { | ||||||
|  |     var emAction = metadataExtractAction.create(isContentChanged); | ||||||
|  |     if (emAction) { | ||||||
|  |         // readOnly=false, newTransaction=false | ||||||
|  |         emAction.execute(file, false, false); | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | function toNodeRefString(persistedObject, itemId) { | ||||||
|  |     // Prefer the NodeRef returned by saveForm (when kind=node). | ||||||
|  |     if (persistedObject instanceof Packages.org.alfresco.service.cmr.repository.NodeRef) { | ||||||
|  |         return persistedObject.toString(); | ||||||
|  |     } | ||||||
|  |     // If the client passed a full noderef, keep it. | ||||||
|  |     if (itemId && itemId.indexOf("://") !== -1) { | ||||||
|  |         return itemId; | ||||||
|  |     } | ||||||
|  |     // Otherwise assume SpacesStore UUID. | ||||||
|  |     return "workspace://SpacesStore/" + itemId; | ||||||
|  | } | ||||||
| main(); | main(); | ||||||
| @@ -45,7 +45,11 @@ | |||||||
| 				"parentType": "${row.item.parentTypeShort!""}", | 				"parentType": "${row.item.parentTypeShort!""}", | ||||||
| 				"isContainer": ${row.item.isContainer?string}, | 				"isContainer": ${row.item.isContainer?string}, | ||||||
| 				<#if row.container??>"container": "${row.container!""}",</#if> | 				<#if row.container??>"container": "${row.container!""}",</#if> | ||||||
|  |                 <#if row.item.properties?? && row.item.properties.name??> | ||||||
|                 	"name": "${row.item.properties.name!""}", |                 	"name": "${row.item.properties.name!""}", | ||||||
|  |                 <#else> | ||||||
|  |                 	"name": "${(row.item.name)!row.item?string!""}", | ||||||
|  |                 </#if> | ||||||
|                 <#if row.item.aspects??> |                 <#if row.item.aspects??> | ||||||
|                  "aspects": [ |                  "aspects": [ | ||||||
|                    <#list row.item.aspects as aspect> |                    <#list row.item.aspects as aspect> | ||||||
| @@ -54,10 +58,15 @@ | |||||||
|                    </#list> |                    </#list> | ||||||
|                    ], |                    ], | ||||||
|                  </#if> |                  </#if> | ||||||
|  |                 <#if row.item.properties??> | ||||||
| 					"title":<#if row.item.properties["lnk:title"]??>"${row.item.properties["lnk:title"]}", | 					"title":<#if row.item.properties["lnk:title"]??>"${row.item.properties["lnk:title"]}", | ||||||
| 							<#elseif row.item.properties["ia:whatEvent"]??>"${row.item.properties["ia:whatEvent"]}", | 							<#elseif row.item.properties["ia:whatEvent"]??>"${row.item.properties["ia:whatEvent"]}", | ||||||
| 							<#else>"${row.item.properties.title!""}",</#if> | 							<#else>"${row.item.properties.title!""}",</#if> | ||||||
| 					"description": "${row.item.properties.description!""}", | 					"description": "${row.item.properties.description!""}", | ||||||
|  |                 <#else> | ||||||
|  | 					"title": "${(row.item.name)!row.item?string!""}", | ||||||
|  | 					"description": "", | ||||||
|  |                 </#if> | ||||||
| 				<#if row.item.properties.modified??>"modified": "${xmldate(row.item.properties.modified)}",</#if> | 				<#if row.item.properties.modified??>"modified": "${xmldate(row.item.properties.modified)}",</#if> | ||||||
| 				<#if row.item.properties.modifier??>"modifier": "${row.item.properties.modifier}",</#if> | 				<#if row.item.properties.modifier??>"modifier": "${row.item.properties.modifier}",</#if> | ||||||
| 				<#if row.item.siteShortName??>"site": "${row.item.siteShortName}",</#if> | 				<#if row.item.siteShortName??>"site": "${row.item.siteShortName}",</#if> | ||||||
|   | |||||||
| @@ -2,7 +2,7 @@ function extractMetadata(file) | |||||||
| { | { | ||||||
|    // Extract metadata - via repository action for now. |    // Extract metadata - via repository action for now. | ||||||
|    // This should use the MetadataExtracter API to fetch properties, allowing for possible failures. |    // This should use the MetadataExtracter API to fetch properties, allowing for possible failures. | ||||||
|    var emAction = actions.create("extract-metadata"); |    var emAction = metadataExtractAction.create(true); | ||||||
|    if (emAction != null) |    if (emAction != null) | ||||||
|    { |    { | ||||||
|       // Call using readOnly = false, newTransaction = false |       // Call using readOnly = false, newTransaction = false | ||||||
|   | |||||||
| @@ -29,6 +29,7 @@ import static org.junit.Assert.assertEquals; | |||||||
| import static org.junit.Assert.assertNotNull; | import static org.junit.Assert.assertNotNull; | ||||||
| import static org.junit.Assert.assertTrue; | import static org.junit.Assert.assertTrue; | ||||||
| import static org.junit.Assert.fail; | import static org.junit.Assert.fail; | ||||||
|  | import static org.mockito.Mockito.lenient; | ||||||
| import static org.mockito.Mockito.never; | import static org.mockito.Mockito.never; | ||||||
| import static org.mockito.Mockito.verify; | import static org.mockito.Mockito.verify; | ||||||
| import static org.mockito.Mockito.when; | import static org.mockito.Mockito.when; | ||||||
| @@ -203,8 +204,8 @@ public class MoveMethodTest | |||||||
|     @Test |     @Test | ||||||
|     public void canRenameFoldersWhenNewNameMatchesShufflePattern() throws Exception |     public void canRenameFoldersWhenNewNameMatchesShufflePattern() throws Exception | ||||||
|     { |     { | ||||||
|         when(davHelper.isRenameShuffle(destPath)).thenReturn(true); |         lenient().when(davHelper.isRenameShuffle(destPath)).thenReturn(true); | ||||||
|         when(davHelper.isRenameShuffle(sourcePath)).thenReturn(false); |         lenient().when(davHelper.isRenameShuffle(sourcePath)).thenReturn(false); | ||||||
|  |  | ||||||
|         // Test: Perform the rename |         // Test: Perform the rename | ||||||
|         moveMethod.moveOrCopy(sourceNodeRef, sourceParentNodeRef, destParentNodeRef, "dest.doc"); |         moveMethod.moveOrCopy(sourceNodeRef, sourceParentNodeRef, destParentNodeRef, "dest.doc"); | ||||||
| @@ -247,8 +248,8 @@ public class MoveMethodTest | |||||||
|         sourcePath = "/path/from/test.doc"; |         sourcePath = "/path/from/test.doc"; | ||||||
|         moveMethod.m_strPath = sourcePath; |         moveMethod.m_strPath = sourcePath; | ||||||
|  |  | ||||||
|         when(davHelper.getServiceRegistry()).thenReturn(mockServiceRegistry); |         lenient().when(davHelper.getServiceRegistry()).thenReturn(mockServiceRegistry); | ||||||
|         when(mockServiceRegistry.getContentService()).thenReturn(mockContentService); |         lenient().when(mockServiceRegistry.getContentService()).thenReturn(mockContentService); | ||||||
|  |  | ||||||
|         List<String> sourcePathSplit = Arrays.asList("path", "from", "test.doc"); |         List<String> sourcePathSplit = Arrays.asList("path", "from", "test.doc"); | ||||||
|         when(davHelper.splitAllPaths(sourcePath)).thenReturn(sourcePathSplit); |         when(davHelper.splitAllPaths(sourcePath)).thenReturn(sourcePathSplit); | ||||||
| @@ -366,7 +367,7 @@ public class MoveMethodTest | |||||||
|  |  | ||||||
|                     when(mockFileFolderService.resolveNamePath(rootNode, sourcePathSplit)).thenReturn(tmpFI); |                     when(mockFileFolderService.resolveNamePath(rootNode, sourcePathSplit)).thenReturn(tmpFI); | ||||||
|                     when(davHelper.isRenameShuffle(destPath)).thenReturn(false); |                     when(davHelper.isRenameShuffle(destPath)).thenReturn(false); | ||||||
|                     when(davHelper.isRenameShuffle(sourcePath)).thenReturn(true); |                     lenient().when(davHelper.isRenameShuffle(sourcePath)).thenReturn(true); | ||||||
|  |  | ||||||
|                     moveMethod.moveOrCopy(atmpFI.getNodeRef(), companyHomeNodeRef, companyHomeNodeRef, bakFileName); |                     moveMethod.moveOrCopy(atmpFI.getNodeRef(), companyHomeNodeRef, companyHomeNodeRef, bakFileName); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,6 +25,8 @@ | |||||||
|  */ |  */ | ||||||
| package org.alfresco.rest.api.tests; | package org.alfresco.rest.api.tests; | ||||||
|  |  | ||||||
|  | import java.util.Arrays; | ||||||
|  |  | ||||||
| import org.alfresco.repo.web.util.JettyComponent; | import org.alfresco.repo.web.util.JettyComponent; | ||||||
|  |  | ||||||
| public class EnterprisePublicApiTestFixture extends EnterpriseTestFixture | public class EnterprisePublicApiTestFixture extends EnterpriseTestFixture | ||||||
| @@ -40,32 +42,53 @@ public class EnterprisePublicApiTestFixture extends EnterpriseTestFixture | |||||||
|     public final static String[] CLASS_LOCATIONS = new String[]{"classpath*:/publicapi/lucene/"}; |     public final static String[] CLASS_LOCATIONS = new String[]{"classpath*:/publicapi/lucene/"}; | ||||||
|  |  | ||||||
|     private static EnterprisePublicApiTestFixture instance; |     private static EnterprisePublicApiTestFixture instance; | ||||||
|  |     private String[] customConfigLocations; | ||||||
|  |  | ||||||
|     /* Note: synchronized for multi-threaded test access */ |     /* Note: synchronized for multi-threaded test access */ | ||||||
|     public synchronized static EnterprisePublicApiTestFixture getInstance(boolean createTestData) throws Exception |     public synchronized static EnterprisePublicApiTestFixture getInstance(boolean createTestData, String... customConfigLocations) | ||||||
|     { |     { | ||||||
|         if (instance == null) |         if (instance == null) | ||||||
|         { |         { | ||||||
|             instance = new EnterprisePublicApiTestFixture(); |             instance = new EnterprisePublicApiTestFixture(customConfigLocations); | ||||||
|  |             try | ||||||
|  |             { | ||||||
|                 instance.setup(createTestData); |                 instance.setup(createTestData); | ||||||
|             } |             } | ||||||
|  |             catch (Exception e) | ||||||
|  |             { | ||||||
|  |                 String errorMessage = "Exception was thrown during setup EnterprisePublicApiTestFixture: " + e.getClass() + " - " + e.getMessage(); | ||||||
|  |                 throw new RuntimeException(errorMessage, e); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|         return instance; |         return instance; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public static EnterprisePublicApiTestFixture getInstance() throws Exception |     public static EnterprisePublicApiTestFixture getInstance(String... customConfigLocations) | ||||||
|     { |     { | ||||||
|         return getInstance(true); |         return getInstance(true, customConfigLocations); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     private EnterprisePublicApiTestFixture() |     public static EnterprisePublicApiTestFixture getInstance() | ||||||
|  |     { | ||||||
|  |         return getInstance(true, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     public static EnterprisePublicApiTestFixture getInstance(boolean createTestData) | ||||||
|  |     { | ||||||
|  |         return getInstance(createTestData, null); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     private EnterprisePublicApiTestFixture(String... customConfigLocations) | ||||||
|     { |     { | ||||||
|         super(CONFIG_LOCATIONS, CLASS_LOCATIONS, PORT, CONTEXT_PATH, PUBLIC_API_SERVLET_NAME, DEFAULT_NUM_MEMBERS_PER_SITE, false); |         super(CONFIG_LOCATIONS, CLASS_LOCATIONS, PORT, CONTEXT_PATH, PUBLIC_API_SERVLET_NAME, DEFAULT_NUM_MEMBERS_PER_SITE, false); | ||||||
|  |         this.customConfigLocations = customConfigLocations; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     protected JettyComponent makeJettyComponent() |     protected JettyComponent makeJettyComponent() | ||||||
|     { |     { | ||||||
|         JettyComponent jettyComponent = new EnterpriseJettyComponent(getPort(), getContextPath(), getConfigLocations(), getClassLocations()); |         String[] configLocations = mergeLocations(getConfigLocations(), this.customConfigLocations); | ||||||
|  |         JettyComponent jettyComponent = new EnterpriseJettyComponent(getPort(), getContextPath(), configLocations, getClassLocations()); | ||||||
|         return jettyComponent; |         return jettyComponent; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -74,4 +97,19 @@ public class EnterprisePublicApiTestFixture extends EnterpriseTestFixture | |||||||
|     { |     { | ||||||
|         return new RepoService(applicationContext); |         return new RepoService(applicationContext); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     private String[] mergeLocations(String[]... locations) | ||||||
|  |     { | ||||||
|  |         String[] mergedLocations = new String[0]; | ||||||
|  |         for (String[] location : locations) | ||||||
|  |         { | ||||||
|  |             if (location == null || location.length == 0) | ||||||
|  |             { | ||||||
|  |                 continue; | ||||||
|  |             } | ||||||
|  |             mergedLocations = Arrays.copyOf(mergedLocations, mergedLocations.length + location.length); | ||||||
|  |             System.arraycopy(location, 0, mergedLocations, mergedLocations.length - location.length, location.length); | ||||||
|  |         } | ||||||
|  |         return mergedLocations; | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -36,15 +36,21 @@ public class EnterpriseTestApi extends AbstractTestApi | |||||||
|         getTestFixture().getRandomNetwork(); |         getTestFixture().getRandomNetwork(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     protected String[] getCustomConfigLocations() | ||||||
|  |     { | ||||||
|  |         return new String[]{}; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     protected TestFixture getTestFixture() throws Exception |     protected TestFixture getTestFixture() throws Exception | ||||||
|     { |     { | ||||||
|         return EnterprisePublicApiTestFixture.getInstance(); |         return EnterprisePublicApiTestFixture.getInstance(getCustomConfigLocations()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     protected TestFixture getTestFixture(boolean createTestData) throws Exception |     protected TestFixture getTestFixture(boolean createTestData) throws Exception | ||||||
|     { |     { | ||||||
|         return EnterprisePublicApiTestFixture.getInstance(createTestData); |         return EnterprisePublicApiTestFixture.getInstance(createTestData, getCustomConfigLocations()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -130,6 +130,7 @@ public class QueriesSitesApiTest extends AbstractSingleNetworkSiteTest | |||||||
|     public void testLiveSearchSites() throws Exception |     public void testLiveSearchSites() throws Exception | ||||||
|     { |     { | ||||||
|         setRequestContext(user1); |         setRequestContext(user1); | ||||||
|  |         AuthenticationUtil.setFullyAuthenticatedUser(user1); | ||||||
|  |  | ||||||
|         int sCount = 5; |         int sCount = 5; | ||||||
|         assertTrue(sCount > 4); // as relied on by test below |         assertTrue(sCount > 4); // as relied on by test below | ||||||
| @@ -231,7 +232,11 @@ public class QueriesSitesApiTest extends AbstractSingleNetworkSiteTest | |||||||
|  |  | ||||||
|     private NodeRef getNodeRef(String createdSiteId) |     private NodeRef getNodeRef(String createdSiteId) | ||||||
|     { |     { | ||||||
|         AuthenticationUtil.setFullyAuthenticatedUser(user1); |         // Created sites do not return NodeRefs to the caller so we need to get the NodeRef from the siteService. | ||||||
|  |         // Temporarily as admin we will get NodeRefs to handle ACL authorization. | ||||||
|  |         String userUnderTest = AuthenticationUtil.getFullyAuthenticatedUser(); | ||||||
|  |         AuthenticationUtil.setFullyAuthenticatedUser(DEFAULT_ADMIN); | ||||||
|  |  | ||||||
|         // The following call to siteService.getSite(createdSiteId).getNodeRef() returns a NodeRef like: |         // The following call to siteService.getSite(createdSiteId).getNodeRef() returns a NodeRef like: | ||||||
|         // workspace://SpacesStore/9db76769-96de-4de4-bdb4-a127130af362 |         // workspace://SpacesStore/9db76769-96de-4de4-bdb4-a127130af362 | ||||||
|         // We call tenantService.getName(nodeRef) to get a fully qualified NodeRef as Solr returns this. |         // We call tenantService.getName(nodeRef) to get a fully qualified NodeRef as Solr returns this. | ||||||
| @@ -239,6 +244,8 @@ public class QueriesSitesApiTest extends AbstractSingleNetworkSiteTest | |||||||
|         // workspace://@org.alfresco.rest.api.tests.queriespeopleapitest@SpacesStore/9db76769-96de-4de4-bdb4-a127130af362 |         // workspace://@org.alfresco.rest.api.tests.queriespeopleapitest@SpacesStore/9db76769-96de-4de4-bdb4-a127130af362 | ||||||
|         NodeRef nodeRef = siteService.getSite(createdSiteId).getNodeRef(); |         NodeRef nodeRef = siteService.getSite(createdSiteId).getNodeRef(); | ||||||
|         nodeRef = tenantService.getName(nodeRef); |         nodeRef = tenantService.getName(nodeRef); | ||||||
|  |  | ||||||
|  |         AuthenticationUtil.setFullyAuthenticatedUser(userUnderTest); | ||||||
|         return nodeRef; |         return nodeRef; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -246,6 +253,7 @@ public class QueriesSitesApiTest extends AbstractSingleNetworkSiteTest | |||||||
|     public void testLiveSearchSites_SortPage() throws Exception |     public void testLiveSearchSites_SortPage() throws Exception | ||||||
|     { |     { | ||||||
|         setRequestContext(user1); |         setRequestContext(user1); | ||||||
|  |         AuthenticationUtil.setFullyAuthenticatedUser(user1); | ||||||
|  |  | ||||||
|         List<String> siteIds = new ArrayList<>(5); |         List<String> siteIds = new ArrayList<>(5); | ||||||
|  |  | ||||||
| @@ -306,6 +314,51 @@ public class QueriesSitesApiTest extends AbstractSingleNetworkSiteTest | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * If the search service do not support ACL filtering, then the Queries API should handle the response to exclude private sites and potential unauthorized error when building response. | ||||||
|  |      */ | ||||||
|  |     @Test | ||||||
|  |     public void testLiveSearchExcludesPrivateSites() throws Exception | ||||||
|  |     { | ||||||
|  |         String publicSiteId = null; | ||||||
|  |         String privateSiteId = null; | ||||||
|  |         try | ||||||
|  |         { | ||||||
|  |             // given | ||||||
|  |             setRequestContext(null, DEFAULT_ADMIN, DEFAULT_ADMIN_PWD); | ||||||
|  |             createUser("bartender"); | ||||||
|  |  | ||||||
|  |             publicSiteId = createSite("samePrefixPublicSite", "samePrefixPublicSite", "Visible to all users", SiteVisibility.PUBLIC, 201).getId(); | ||||||
|  |             privateSiteId = createSite("samePrefixPrivateSite", "samePrefixPrivateSite", "Hidden from bartender", SiteVisibility.PRIVATE, 201).getId(); | ||||||
|  |  | ||||||
|  |             String[] searchResults = {publicSiteId, privateSiteId}; | ||||||
|  |             String[] expectedSites = {publicSiteId}; | ||||||
|  |  | ||||||
|  |             // when | ||||||
|  |             setRequestContext(null, "bartender", "password"); | ||||||
|  |             AuthenticationUtil.setFullyAuthenticatedUser("bartender"); | ||||||
|  |  | ||||||
|  |             // then | ||||||
|  |             checkApiCall("samePrefix", null, getPaging(0, 100), 200, expectedSites, searchResults); | ||||||
|  |         } | ||||||
|  |         finally | ||||||
|  |         { | ||||||
|  |             // cleanup | ||||||
|  |             AuthenticationUtil.setFullyAuthenticatedUser(DEFAULT_ADMIN); | ||||||
|  |             setRequestContext(null, DEFAULT_ADMIN, DEFAULT_ADMIN_PWD); | ||||||
|  |             if (publicSiteId != null) | ||||||
|  |             { | ||||||
|  |                 deleteSite(publicSiteId, true, 204); | ||||||
|  |             } | ||||||
|  |             if (privateSiteId != null) | ||||||
|  |             { | ||||||
|  |                 deleteSite(privateSiteId, true, 204); | ||||||
|  |             } | ||||||
|  |             deleteUser("bartender", null); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     public String getScope() |     public String getScope() | ||||||
|     { |     { | ||||||
|   | |||||||
| @@ -1 +0,0 @@ | |||||||
| com.epam.reportportal.testng.ReportPortalTestNGListener |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								remote-api/src/test/resources/publicapi/upload/babekyrtso.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								remote-api/src/test/resources/publicapi/upload/babekyrtso.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -27,7 +27,7 @@ to integrate with a number of external Authentication providers including | |||||||
|   * https://github.com/Alfresco/alfresco-data-model/tree/master/src/main/java/org/alfresco/repo/security/authentication |   * https://github.com/Alfresco/alfresco-data-model/tree/master/src/main/java/org/alfresco/repo/security/authentication | ||||||
| * License: LGPL | * License: LGPL | ||||||
| * Issue Tracker Link: https://issues.alfresco.com/jira/issues/?jql=project%3DREPO | * Issue Tracker Link: https://issues.alfresco.com/jira/issues/?jql=project%3DREPO | ||||||
| * Documentation Link: https://support.hyland.com/r/Alfresco/Alfresco-Content-Services-Community-Edition/23.4/Alfresco-Content-Services-Community-Edition/Administer/Manage-Security/Authentication-and-sync | * Documentation Link: https://support.hyland.com/access?dita:id=byj1720776091160&vrm_version=25.2&component=Alfresco%20Content%20Services%20Community%20Edition | ||||||
| * Contribution Model: Alfresco Open Source | * Contribution Model: Alfresco Open Source | ||||||
| *** | *** | ||||||
|  |  | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ | |||||||
| * Source Code Link:m https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/ | * Source Code Link:m https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/ | ||||||
| * License: LGPL | * License: LGPL | ||||||
| * Issue Tracker Link: https://issues.alfresco.com/jira/secure/RapidBoard.jspa?projectKey=REPO&useStoredSettings=true&rapidView=379 | * Issue Tracker Link: https://issues.alfresco.com/jira/secure/RapidBoard.jspa?projectKey=REPO&useStoredSettings=true&rapidView=379 | ||||||
| * Documentation Link: https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Configure/Repository/About-Versioning | * Documentation Link: https://support.hyland.com/access?dita:id=ybx1720084724583&vrm_version=25.2 | ||||||
| * Contribution Model: Alfresco publishes the source code and will review proposed patch requests | * Contribution Model: Alfresco publishes the source code and will review proposed patch requests | ||||||
| *** | *** | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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>25.2.0.43</version> |         <version>25.3.0.57</version> | ||||||
|     </parent> |     </parent> | ||||||
|  |  | ||||||
|     <dependencies> |     <dependencies> | ||||||
| @@ -85,7 +85,7 @@ | |||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.apache.commons</groupId> |             <groupId>org.apache.commons</groupId> | ||||||
|             <artifactId>commons-fileupload2-jakarta</artifactId> |             <artifactId>commons-fileupload2-jakarta-servlet6</artifactId> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.apache.commons</groupId> |             <groupId>org.apache.commons</groupId> | ||||||
| @@ -94,7 +94,6 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.apache.commons</groupId> |             <groupId>org.apache.commons</groupId> | ||||||
|             <artifactId>commons-lang3</artifactId> |             <artifactId>commons-lang3</artifactId> | ||||||
|             <version>3.17.0</version> |  | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>commons-codec</groupId> |             <groupId>commons-codec</groupId> | ||||||
| @@ -120,7 +119,7 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>commons-validator</groupId> |             <groupId>commons-validator</groupId> | ||||||
|             <artifactId>commons-validator</artifactId> |             <artifactId>commons-validator</artifactId> | ||||||
|             <version>1.9.0</version> |             <version>1.10.0</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.json</groupId> |             <groupId>org.json</groupId> | ||||||
| @@ -358,7 +357,7 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>com.fasterxml.woodstox</groupId> |             <groupId>com.fasterxml.woodstox</groupId> | ||||||
|             <artifactId>woodstox-core</artifactId> |             <artifactId>woodstox-core</artifactId> | ||||||
|             <version>7.0.0</version> |             <version>7.1.1</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <dependency> |         <dependency> | ||||||
| @@ -402,7 +401,7 @@ | |||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.mybatis</groupId> |             <groupId>org.mybatis</groupId> | ||||||
|             <artifactId>mybatis-spring</artifactId> |             <artifactId>mybatis-spring</artifactId> | ||||||
|             <version>3.0.4</version> |             <version>3.0.5</version> | ||||||
|         </dependency> |         </dependency> | ||||||
|  |  | ||||||
|         <!-- Activiti --> |         <!-- Activiti --> | ||||||
| @@ -627,11 +626,6 @@ | |||||||
|             <artifactId>junit</artifactId> |             <artifactId>junit</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>com.epam.reportportal</groupId> |  | ||||||
|             <artifactId>agent-java-testng</artifactId> |  | ||||||
|             <scope>test</scope> |  | ||||||
|         </dependency> |  | ||||||
|         <dependency> |         <dependency> | ||||||
|             <groupId>org.assertj</groupId> |             <groupId>org.assertj</groupId> | ||||||
|             <artifactId>assertj-core</artifactId> |             <artifactId>assertj-core</artifactId> | ||||||
| @@ -742,10 +736,6 @@ | |||||||
|             <artifactId>reflections</artifactId> |             <artifactId>reflections</artifactId> | ||||||
|             <scope>test</scope> |             <scope>test</scope> | ||||||
|         </dependency> |         </dependency> | ||||||
|         <dependency> |  | ||||||
|             <groupId>commons-lang</groupId> |  | ||||||
|             <artifactId>commons-lang</artifactId> |  | ||||||
|         </dependency> |  | ||||||
|     </dependencies> |     </dependencies> | ||||||
|  |  | ||||||
|     <build> |     <build> | ||||||
|   | |||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user