mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
202 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b7711b17f5 | ||
|
3687d06c8f | ||
|
f763a3a6cc | ||
|
220badc4dc | ||
|
8d6e021207 | ||
|
dc48e60382 | ||
|
66bc900254 | ||
|
37cad17e7a | ||
|
226c695d97 | ||
|
5703bf0927 | ||
|
c370c39e34 | ||
|
643510f1b4 | ||
|
5e2c8eac98 | ||
|
888d034b82 | ||
|
b16b116293 | ||
|
f4a6346471 | ||
|
70387a8a19 | ||
|
c4b9ee4284 | ||
|
1629daa28e | ||
|
c9f2b1f9c7 | ||
|
f00af42eee | ||
|
6849da5d48 | ||
|
d4816e71bd | ||
|
652e36bcac | ||
|
22b9bfd056 | ||
|
4743ee4d9a | ||
|
1d7ac4dfaf | ||
|
1a17f7a0cf | ||
|
7d98849187 | ||
|
cb92c78b3c | ||
|
733e232e42 | ||
|
6804d5e288 | ||
|
ef0a39871d | ||
|
6b929e45e7 | ||
|
7249bc91ff | ||
|
d20b00b9ae | ||
|
208e10c9b0 | ||
|
304c68444c | ||
|
2f0a502958 | ||
|
e6d3963ef6 | ||
|
5004d357b9 | ||
|
6c61e78b2a | ||
|
d5192922cf | ||
|
9e3cf355e1 | ||
|
d0f18ac1a5 | ||
|
bcf8a576e9 | ||
|
1a8ca698c7 | ||
|
cabb64f4cd | ||
|
3cd5cfbbe1 | ||
|
6d6e6d913e | ||
|
692da57e7f | ||
|
d4b0499c00 | ||
|
1b35495717 | ||
|
2b9b6b825c | ||
|
6244cb87b6 | ||
|
52c5f34e1a | ||
|
cd977453a4 | ||
|
1592f7fa1d | ||
|
ea36e77775 | ||
|
e5968a25f3 | ||
|
c02422077c | ||
|
021f7f98d4 | ||
|
9d9c7a8d73 | ||
|
96b5968ce4 | ||
|
7b3c24416c | ||
|
03412b7d5a | ||
|
ab34e52f4e | ||
|
fb45a3e3c2 | ||
|
d11a0deacc | ||
|
35c01f78c3 | ||
|
2ba65ac19d | ||
|
c7e79193b0 | ||
|
85648077e6 | ||
|
a5bf4c750b | ||
|
986c387412 | ||
|
7956830390 | ||
|
2421752f4d | ||
|
3be58cf5af | ||
|
c34212b1b3 | ||
|
da9c7c372c | ||
|
148c0e9602 | ||
|
3eada8a1fd | ||
|
1416f4d877 | ||
|
0f3708c01b | ||
|
f193389fe5 | ||
|
fc0a1d3cc6 | ||
|
3551dbeb29 | ||
|
436fde1a06 | ||
|
c5ac2f3c4a | ||
|
ae00e09b11 | ||
|
38b796f9ce | ||
|
f9be67add6 | ||
|
dc458fd54e | ||
|
60a0d6a492 | ||
|
f204310364 | ||
|
7ac4c434e9 | ||
|
82f7b5a005 | ||
|
0f99564ca0 | ||
|
b14f1ee7f1 | ||
|
99ef818606 | ||
|
62a9d439b7 | ||
|
0253b399a2 | ||
|
24541a9512 | ||
|
2f6d097e16 | ||
|
7b074e1ee2 | ||
|
1bc5c94ace | ||
|
ba68efec67 | ||
|
bfcca88e63 | ||
|
9d704df3c0 | ||
|
73d46c1702 | ||
|
261dcc93bd | ||
|
2fa44f407c | ||
|
8e0377d586 | ||
|
925a2bb6b9 | ||
|
4eafb13ba6 | ||
|
f731c9734c | ||
|
e0a3b843f2 | ||
|
2889b1a8a3 | ||
|
22aa1f2725 | ||
|
77ab7d83fe | ||
|
a8faa94d15 | ||
|
baafbbbeb2 | ||
|
ed061f2287 | ||
|
6e435e1a8c | ||
|
05f6b90df8 | ||
|
0550dcd4f7 | ||
|
e137c91152 | ||
|
5a1c8334c8 | ||
|
c7bbb1f74b | ||
|
49a34c4fe3 | ||
|
70af2ea3ad | ||
|
ab6c5feba7 | ||
|
cb3cbb553a | ||
|
9470c27f3d | ||
|
edf263c43f | ||
|
69bb9a308a | ||
|
853d1bdc1b | ||
|
f7d1bbcec3 | ||
|
731d580f7e | ||
|
ad4126ffea | ||
|
933aced67c | ||
|
de0ba15a91 | ||
|
00c36251d4 | ||
|
ea9ce0c0c2 | ||
|
37231e50a2 | ||
|
26d8c7dcbe | ||
|
6ea97033d3 | ||
|
cd0b2ffd24 | ||
|
a14cbacb68 | ||
|
fc0b9863d4 | ||
|
29dc42d445 | ||
|
39da968d76 | ||
|
6a4fecd46e | ||
|
e083d4fcc2 | ||
|
53e8a06a6e | ||
|
c80e1fa94b | ||
|
675c6f7aa1 | ||
|
44d67847da | ||
|
d405043c5d | ||
|
da50f6271c | ||
|
a5e713c176 | ||
|
2dcd2788b2 | ||
|
6b738342c1 | ||
|
ba5f5418ab | ||
|
ee8f3bec18 | ||
|
39395af528 | ||
|
e6f9d88779 | ||
|
70f70c6ed3 | ||
|
15045f9612 | ||
|
c50c7c6a7e | ||
|
60199141f5 | ||
|
b5e023950d | ||
|
d4591acf2c | ||
|
f34f2849dd | ||
|
52f2be49f3 | ||
|
748be1f4a0 | ||
|
52f1af2da6 | ||
|
626a97ff45 | ||
|
4a91132226 | ||
|
b6fb8725ce | ||
|
5fc0d9edde | ||
|
44d394b1a0 | ||
|
c1d62cca4d | ||
|
24ae4ce57c | ||
|
b8f2ec252d | ||
|
ae721c86f6 | ||
|
aacef0c949 | ||
|
e4edceda75 | ||
|
09ec6688c6 | ||
|
14025f00de | ||
|
22c5a5e134 | ||
|
154cad1ff8 | ||
|
7749b89e2b | ||
|
bbb45e667b | ||
|
a5f01e0d94 | ||
|
0c6d455ec4 | ||
|
5e86f5163e | ||
|
4981be1564 | ||
|
9a30fbb75a | ||
|
9c86fdb8b5 | ||
|
c52f74832d | ||
|
70dd7642f4 |
230
.github/workflows/ci.yml
vendored
230
.github/workflows/ci.yml
vendored
@@ -44,14 +44,14 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- id: changed-files
|
- id: changed-files
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/github-list-changes@v8.2.0
|
||||||
with:
|
with:
|
||||||
write-list-to-env: true
|
write-list-to-env: true
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Prepare maven cache and check compilation"
|
- name: "Prepare maven cache and check compilation"
|
||||||
@@ -69,12 +69,12 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v8.2.0
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||||
@@ -92,10 +92,10 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/github-download-file@v8.2.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
repository: "Alfresco/veracode-baseline-archive"
|
repository: "Alfresco/veracode-baseline-archive"
|
||||||
@@ -106,12 +106,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/ci/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Remove excluded files"
|
||||||
|
run: |
|
||||||
|
mkdir temp-dir-for-sast
|
||||||
|
bash ./scripts/ci/remove-sast-exclusions.sh ./packaging/war/target/alfresco.war temp-dir-for-sast/reduced.war
|
||||||
- name: "Run SAST Scan"
|
- name: "Run SAST Scan"
|
||||||
uses: veracode/Veracode-pipeline-scan-action@v1.0.16
|
uses: veracode/Veracode-pipeline-scan-action@v1.0.16
|
||||||
with:
|
with:
|
||||||
vid: ${{ secrets.VERACODE_API_ID }}
|
vid: ${{ secrets.VERACODE_API_ID }}
|
||||||
vkey: ${{ secrets.VERACODE_API_KEY }}
|
vkey: ${{ secrets.VERACODE_API_KEY }}
|
||||||
file: "packaging/war/target/alfresco.war"
|
file: "temp-dir-for-sast/reduced.war"
|
||||||
fail_build: true
|
fail_build: true
|
||||||
project_name: alfresco-community-repo
|
project_name: alfresco-community-repo
|
||||||
issue_details: true
|
issue_details: true
|
||||||
@@ -129,6 +133,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Veracode Pipeline-Scan Results (Human Readable)
|
name: Veracode Pipeline-Scan Results (Human Readable)
|
||||||
path: readable_output.zip
|
path: readable_output.zip
|
||||||
|
- name: "Remove temporary directory"
|
||||||
|
run: rm -rfv temp-dir-for-sast
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -142,10 +148,10 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[skip tests]') &&
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force]')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- uses: Alfresco/ya-pmd-scan@v4.3.0
|
- uses: Alfresco/ya-pmd-scan@v4.1.0
|
||||||
with:
|
with:
|
||||||
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
|
classpath-build-command: "mvn test-compile -ntp -Pags -pl \"-:alfresco-community-repo-docker\""
|
||||||
|
|
||||||
@@ -175,14 +181,14 @@ jobs:
|
|||||||
testAttributes: "-Dtest=AllMmtUnitTestSuite"
|
testAttributes: "-Dtest=AllMmtUnitTestSuite"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testModule }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testModule }}
|
||||||
@@ -213,7 +219,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -255,9 +261,9 @@ jobs:
|
|||||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
@@ -270,7 +276,7 @@ jobs:
|
|||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }}
|
||||||
@@ -301,7 +307,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -331,12 +337,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version: ['10.2.18', '10.4', '10.5']
|
version: ['10.5', '10.6']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: Run MariaDB ${{ matrix.version }} database
|
- name: Run MariaDB ${{ matrix.version }} database
|
||||||
@@ -345,7 +351,7 @@ jobs:
|
|||||||
MARIADB_VERSION: ${{ matrix.version }}
|
MARIADB_VERSION: ${{ matrix.version }}
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.version }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.version }}
|
||||||
@@ -376,7 +382,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -392,8 +398,8 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
repository_mariadb_10_6_tests:
|
repository_mariadb_10_11_tests:
|
||||||
name: "Repository - MariaDB 10.6 tests"
|
name: "Repository - MariaDB 10.11 tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
if: >
|
if: >
|
||||||
@@ -405,18 +411,18 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run MariaDB 10.6 database"
|
- name: "Run MariaDB 10.11 database"
|
||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||||
env:
|
env:
|
||||||
MARIADB_VERSION: 10.6
|
MARIADB_VERSION: 10.11
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -447,7 +453,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -476,9 +482,9 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run MySQL 8 database"
|
- name: "Run MySQL 8 database"
|
||||||
@@ -487,7 +493,7 @@ jobs:
|
|||||||
MYSQL_VERSION: 8
|
MYSQL_VERSION: 8
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -518,7 +524,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -534,8 +540,8 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
repository_postgresql_13_12_tests:
|
repository_postgresql_14_15_tests:
|
||||||
name: "Repository - PostgreSQL 13.12 tests"
|
name: "Repository - PostgreSQL 14.15 tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
if: >
|
if: >
|
||||||
@@ -546,18 +552,18 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 13.12 database"
|
- name: "Run PostgreSQL 14.15 database"
|
||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
env:
|
env:
|
||||||
POSTGRES_VERSION: 13.12
|
POSTGRES_VERSION: 14.15
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -588,7 +594,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -604,8 +610,8 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
repository_postgresql_14_9_tests:
|
repository_postgresql_15_10_tests:
|
||||||
name: "Repository - PostgreSQL 14.9 tests"
|
name: "Repository - PostgreSQL 15.10 tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
if: >
|
if: >
|
||||||
@@ -616,18 +622,18 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 14.9 database"
|
- name: "Run PostgreSQL 15.10 database"
|
||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
env:
|
env:
|
||||||
POSTGRES_VERSION: 14.9
|
POSTGRES_VERSION: 15.10
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -658,7 +664,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -674,8 +680,8 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
repository_postgresql_15_4_tests:
|
repository_postgresql_16_6_tests:
|
||||||
name: "Repository - PostgreSQL 15.4 tests"
|
name: "Repository - PostgreSQL 16.6 tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
if: >
|
if: >
|
||||||
@@ -686,18 +692,18 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 15.4 database"
|
- name: "Run PostgreSQL 16.6 database"
|
||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
env:
|
env:
|
||||||
POSTGRES_VERSION: 15.4
|
POSTGRES_VERSION: 16.6
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -728,7 +734,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -754,16 +760,16 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run ActiveMQ"
|
- name: "Run ActiveMQ"
|
||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -794,7 +800,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -854,9 +860,9 @@ jobs:
|
|||||||
mvn-options: '-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore'
|
mvn-options: '-Dencryption.ssl.keystore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.keystore -Dencryption.ssl.truststore.location=${CI_WORKSPACE}/keystores/alfresco/alfresco.truststore'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Set transformers tag"
|
- name: "Set transformers tag"
|
||||||
@@ -879,7 +885,7 @@ jobs:
|
|||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }} ${{ matrix.idp }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }} ${{ matrix.idp }}
|
||||||
@@ -910,7 +916,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -968,9 +974,9 @@ jobs:
|
|||||||
REQUIRES_LOCAL_IMAGES: true
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
@@ -986,7 +992,7 @@ jobs:
|
|||||||
run: mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
|
run: mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.test-name }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.test-name }}
|
||||||
@@ -1024,7 +1030,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.tests.outcome }}
|
tests-outcome: ${{ steps.tests.outcome }}
|
||||||
@@ -1050,16 +1056,16 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force')
|
!contains(github.event.head_commit.message, '[force')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run Postgres 15.4 database"
|
- name: "Run Postgres 16.6 database"
|
||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -1090,7 +1096,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -1124,9 +1130,9 @@ jobs:
|
|||||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
@@ -1134,7 +1140,7 @@ jobs:
|
|||||||
bash ./scripts/ci/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (PostgreSQL) ${{ matrix.test-name }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (PostgreSQL) ${{ matrix.test-name }}
|
||||||
@@ -1170,9 +1176,9 @@ jobs:
|
|||||||
REQUIRES_INSTALLED_ARTIFACTS: true
|
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
@@ -1180,7 +1186,7 @@ jobs:
|
|||||||
bash ./scripts/ci/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (MySQL) ${{ matrix.test-name }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (MySQL) ${{ matrix.test-name }}
|
||||||
@@ -1212,9 +1218,9 @@ jobs:
|
|||||||
REQUIRES_LOCAL_IMAGES: true
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
@@ -1228,7 +1234,7 @@ jobs:
|
|||||||
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
|
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
|
||||||
- name: "Prepare Report Portal"
|
- name: "Prepare Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.2.0
|
||||||
id: rp-prepare
|
id: rp-prepare
|
||||||
with:
|
with:
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
||||||
@@ -1260,7 +1266,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Summarize Report Portal"
|
- name: "Summarize Report Portal"
|
||||||
if: github.ref_name == 'master'
|
if: github.ref_name == 'master'
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.2.0
|
||||||
id: rp-summarize
|
id: rp-summarize
|
||||||
with:
|
with:
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
tests-outcome: ${{ steps.run-tests.outcome }}
|
||||||
@@ -1302,9 +1308,9 @@ jobs:
|
|||||||
!contains(github.event.head_commit.message, '[force]')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
|
16
.github/workflows/master_release.yml
vendored
16
.github/workflows/master_release.yml
vendored
@@ -34,12 +34,12 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
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.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- 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.2.0
|
||||||
with:
|
with:
|
||||||
username: ${{ env.GIT_USERNAME }}
|
username: ${{ env.GIT_USERNAME }}
|
||||||
email: ${{ env.GIT_EMAIL }}
|
email: ${{ env.GIT_EMAIL }}
|
||||||
@@ -63,12 +63,12 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
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.2.0
|
||||||
- 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.2.0
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.2.0
|
||||||
- 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.2.0
|
||||||
with:
|
with:
|
||||||
username: ${{ env.GIT_USERNAME }}
|
username: ${{ env.GIT_USERNAME }}
|
||||||
email: ${{ env.GIT_EMAIL }}
|
email: ${{ env.GIT_EMAIL }}
|
||||||
|
@@ -133,21 +133,21 @@
|
|||||||
"filename": ".github/workflows/ci.yml",
|
"filename": ".github/workflows/ci.yml",
|
||||||
"hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572",
|
"hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 293
|
"line_number": 299
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Secret Keyword",
|
"type": "Secret Keyword",
|
||||||
"filename": ".github/workflows/ci.yml",
|
"filename": ".github/workflows/ci.yml",
|
||||||
"hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966",
|
"hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 368
|
"line_number": 374
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Secret Keyword",
|
"type": "Secret Keyword",
|
||||||
"filename": ".github/workflows/ci.yml",
|
"filename": ".github/workflows/ci.yml",
|
||||||
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
|
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 902
|
"line_number": 908
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
".github/workflows/master_release.yml": [
|
".github/workflows/master_release.yml": [
|
||||||
@@ -1273,7 +1273,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": 770,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1539,7 +1539,7 @@
|
|||||||
"filename": "repository/src/test/java/org/alfresco/repo/rendition2/AbstractRenditionIntegrationTest.java",
|
"filename": "repository/src/test/java/org/alfresco/repo/rendition2/AbstractRenditionIntegrationTest.java",
|
||||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 130,
|
"line_number": 127,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1627,7 +1627,7 @@
|
|||||||
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
|
"filename": "repository/src/test/java/org/alfresco/repo/security/authentication/identityservice/SpringBasedIdentityServiceFacadeUnitTest.java",
|
||||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 48,
|
"line_number": 46,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1888,5 +1888,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"generated_at": "2025-05-15T21:47:13Z"
|
"generated_at": "2024-12-19T08:58:42Z"
|
||||||
}
|
}
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</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>23.6.0.20</version>
|
<version>25.1.0.49</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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -200,4 +200,3 @@ public class RuleDefinition
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,4 +71,3 @@ public class FilesAPI extends RMModelRequest<FilesAPI>
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ import com.github.dockerjava.netty.NettyDockerCmdExecFactory;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.alfresco.utility.Utility;
|
import org.alfresco.utility.Utility;
|
||||||
import org.apache.commons.lang3.SystemUtils;
|
import org.apache.commons.lang.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;
|
||||||
|
@@ -117,4 +117,3 @@ public class RecordCategoryAuditLogTest extends BaseRMRestTest {
|
|||||||
auditLog.clearAuditLog(getAdminUser().getUsername(), getAdminUser().getPassword());
|
auditLog.clearAuditLog(getAdminUser().getUsername(), getAdminUser().getPassword());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,6 +26,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.rest.rm.community.hold;
|
package org.alfresco.rest.rm.community.hold;
|
||||||
|
|
||||||
|
import static org.alfresco.rest.rm.community.base.TestData.HOLD_DESCRIPTION;
|
||||||
|
import static org.alfresco.rest.rm.community.base.TestData.HOLD_REASON;
|
||||||
|
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_READ_RECORDS;
|
||||||
|
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
|
||||||
|
import static org.alfresco.utility.report.log.Step.STEP;
|
||||||
import static org.awaitility.Awaitility.await;
|
import static org.awaitility.Awaitility.await;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
@@ -37,25 +44,12 @@ import static org.springframework.http.HttpStatus.NOT_FOUND;
|
|||||||
import static org.springframework.http.HttpStatus.OK;
|
import static org.springframework.http.HttpStatus.OK;
|
||||||
import static org.springframework.http.HttpStatus.UNAUTHORIZED;
|
import static org.springframework.http.HttpStatus.UNAUTHORIZED;
|
||||||
|
|
||||||
import static org.alfresco.rest.rm.community.base.TestData.HOLD_DESCRIPTION;
|
|
||||||
import static org.alfresco.rest.rm.community.base.TestData.HOLD_REASON;
|
|
||||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentAlias.FILE_PLAN_ALIAS;
|
|
||||||
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
|
|
||||||
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_READ_RECORDS;
|
|
||||||
import static org.alfresco.rest.rm.community.util.CommonTestUtils.generateTestPrefix;
|
|
||||||
import static org.alfresco.utility.report.log.Step.STEP;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.testng.annotations.AfterClass;
|
|
||||||
import org.testng.annotations.BeforeClass;
|
|
||||||
import org.testng.annotations.Test;
|
|
||||||
|
|
||||||
import org.alfresco.dataprep.CMISUtil;
|
import org.alfresco.dataprep.CMISUtil;
|
||||||
import org.alfresco.dataprep.ContentActions;
|
import org.alfresco.dataprep.ContentActions;
|
||||||
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||||
@@ -77,6 +71,10 @@ import org.alfresco.utility.constants.UserRole;
|
|||||||
import org.alfresco.utility.model.FileModel;
|
import org.alfresco.utility.model.FileModel;
|
||||||
import org.alfresco.utility.model.FolderModel;
|
import org.alfresco.utility.model.FolderModel;
|
||||||
import org.alfresco.utility.model.UserModel;
|
import org.alfresco.utility.model.UserModel;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.testng.annotations.AfterClass;
|
||||||
|
import org.testng.annotations.BeforeClass;
|
||||||
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API tests for adding items to holds via the bulk process
|
* API tests for adding items to holds via the bulk process
|
||||||
@@ -105,8 +103,7 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
STEP("Create a hold.");
|
STEP("Create a hold.");
|
||||||
hold = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
hold = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
||||||
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
||||||
.reason(HOLD_REASON).build(),
|
.reason(HOLD_REASON).build(), FILE_PLAN_ALIAS);
|
||||||
FILE_PLAN_ALIAS);
|
|
||||||
holds.add(hold);
|
holds.add(hold);
|
||||||
|
|
||||||
STEP("Create test files.");
|
STEP("Create test files.");
|
||||||
@@ -134,23 +131,15 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
.until(() -> getRestAPIFactory().getSearchAPI(null).search(searchRequest).getPagination()
|
.until(() -> getRestAPIFactory().getSearchAPI(null).search(searchRequest).getPagination()
|
||||||
.getTotalItems() == NUMBER_OF_FILES);
|
.getTotalItems() == NUMBER_OF_FILES);
|
||||||
|
|
||||||
RestRequestQueryModel ancestorReq = getContentFromFolderAndAllSubfoldersQuery(rootFolder.getNodeRefWithoutVersion());
|
|
||||||
SearchRequest ancestorSearchRequest = new SearchRequest();
|
|
||||||
ancestorSearchRequest.setQuery(ancestorReq);
|
|
||||||
|
|
||||||
STEP("Wait until paths are indexed.");
|
|
||||||
// to improve stability on CI - seems that sometimes during big load we need to wait longer for the condition
|
|
||||||
await().atMost(120, TimeUnit.SECONDS)
|
|
||||||
.until(() -> getRestAPIFactory().getSearchAPI(null).search(ancestorSearchRequest).getPagination()
|
|
||||||
.getTotalItems() == NUMBER_OF_FILES);
|
|
||||||
|
|
||||||
holdBulkOperation = HoldBulkOperation.builder()
|
holdBulkOperation = HoldBulkOperation.builder()
|
||||||
.query(queryReq)
|
.query(queryReq)
|
||||||
.op(HoldBulkOperationType.ADD).build();
|
.op(HoldBulkOperationType.ADD).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API Then the content is added to the hold and the status of the bulk operation is DONE
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* Then the content is added to the hold and the status of the bulk operation is DONE
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void addContentFromTestSiteToHoldUsingBulkAPI()
|
public void addContentFromTestSiteToHoldUsingBulkAPI()
|
||||||
@@ -169,11 +158,11 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Wait until all files are added to the hold.");
|
STEP("Wait until all files are added to the hold.");
|
||||||
await().atMost(20, TimeUnit.SECONDS).until(
|
await().atMost(20, TimeUnit.SECONDS).until(
|
||||||
() -> getRestAPIFactory().getHoldsAPI(getAdminUser()).getChildren(hold.getId()).getEntries().size() == NUMBER_OF_FILES);
|
() -> getRestAPIFactory().getHoldsAPI(getAdminUser()).getChildren(hold.getId()).getEntries().size()
|
||||||
|
== NUMBER_OF_FILES);
|
||||||
List<String> holdChildrenNodeRefs = getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
List<String> holdChildrenNodeRefs = getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
||||||
.getChildren(hold.getId()).getEntries().stream().map(HoldChildEntry::getEntry).map(
|
.getChildren(hold.getId()).getEntries().stream().map(HoldChildEntry::getEntry).map(
|
||||||
HoldChild::getId)
|
HoldChild::getId).toList();
|
||||||
.toList();
|
|
||||||
assertEquals(addedFiles.stream().map(FileModel::getNodeRefWithoutVersion).sorted().toList(),
|
assertEquals(addedFiles.stream().map(FileModel::getNodeRefWithoutVersion).sorted().toList(),
|
||||||
holdChildrenNodeRefs.stream().sorted().toList());
|
holdChildrenNodeRefs.stream().sorted().toList());
|
||||||
|
|
||||||
@@ -190,15 +179,16 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a folder and all subfolders to a hold using the bulk API Then the content is added to the hold and the status of the bulk operation is DONE
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a folder and all subfolders to a hold using the bulk API
|
||||||
|
* Then the content is added to the hold and the status of the bulk operation is DONE
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void addContentFromFolderAndAllSubfoldersToHoldUsingBulkAPI()
|
public void addContentFromFolderAndAllSubfoldersToHoldUsingBulkAPI()
|
||||||
{
|
{
|
||||||
hold3 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
hold3 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
||||||
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
||||||
.reason(HOLD_REASON).build(),
|
.reason(HOLD_REASON).build(), FILE_PLAN_ALIAS);
|
||||||
FILE_PLAN_ALIAS);
|
|
||||||
holds.add(hold3);
|
holds.add(hold3);
|
||||||
|
|
||||||
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
||||||
@@ -219,11 +209,11 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Wait until all files are added to the hold.");
|
STEP("Wait until all files are added to the hold.");
|
||||||
await().atMost(20, TimeUnit.SECONDS).until(
|
await().atMost(20, TimeUnit.SECONDS).until(
|
||||||
() -> getRestAPIFactory().getHoldsAPI(getAdminUser()).getChildren(hold3.getId()).getEntries().size() == NUMBER_OF_FILES);
|
() -> getRestAPIFactory().getHoldsAPI(getAdminUser()).getChildren(hold3.getId()).getEntries().size()
|
||||||
|
== NUMBER_OF_FILES);
|
||||||
List<String> holdChildrenNodeRefs = getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
List<String> holdChildrenNodeRefs = getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
||||||
.getChildren(hold3.getId()).getEntries().stream().map(HoldChildEntry::getEntry).map(
|
.getChildren(hold3.getId()).getEntries().stream().map(HoldChildEntry::getEntry).map(
|
||||||
HoldChild::getId)
|
HoldChild::getId).toList();
|
||||||
.toList();
|
|
||||||
assertEquals(addedFiles.stream().map(FileModel::getNodeRefWithoutVersion).sorted().toList(),
|
assertEquals(addedFiles.stream().map(FileModel::getNodeRefWithoutVersion).sorted().toList(),
|
||||||
holdChildrenNodeRefs.stream().sorted().toList());
|
holdChildrenNodeRefs.stream().sorted().toList());
|
||||||
|
|
||||||
@@ -240,13 +230,16 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user without the add to hold capability When the user adds content from a site to a hold using the bulk API Then the user receives access denied error
|
* Given a user without the add to hold capability
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* Then the user receives access denied error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessWithUserWithoutAddToHoldCapability()
|
public void testBulkProcessWithUserWithoutAddToHoldCapability()
|
||||||
{
|
{
|
||||||
UserModel userWithoutAddToHoldCapability = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
UserModel userWithoutAddToHoldCapability = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
||||||
UserRole.SiteCollaborator,
|
UserRole
|
||||||
|
.SiteCollaborator,
|
||||||
hold.getId(), UserRoles.ROLE_RM_POWER_USER, PERMISSION_FILING);
|
hold.getId(), UserRoles.ROLE_RM_POWER_USER, PERMISSION_FILING);
|
||||||
users.add(userWithoutAddToHoldCapability);
|
users.add(userWithoutAddToHoldCapability);
|
||||||
|
|
||||||
@@ -260,7 +253,9 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user without the filing permission on a hold When the user adds content from a site to a hold using the bulk API Then the user receives access denied error
|
* Given a user without the filing permission on a hold
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* Then the user receives access denied error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessWithUserWithoutFilingPermissionOnAHold()
|
public void testBulkProcessWithUserWithoutFilingPermissionOnAHold()
|
||||||
@@ -281,7 +276,9 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user without the write permission on all the content When the user adds content from a site to a hold using the bulk API Then all processed items are marked as errors and the last error message contains access denied error
|
* Given a user without the write permission on all the content
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* Then all processed items are marked as errors and the last error message contains access denied error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessWithUserWithoutWritePermissionOnTheContent()
|
public void testBulkProcessWithUserWithoutWritePermissionOnTheContent()
|
||||||
@@ -306,7 +303,8 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
STEP("Verify the response.");
|
STEP("Verify the response.");
|
||||||
assertStatusCode(ACCEPTED);
|
assertStatusCode(ACCEPTED);
|
||||||
|
|
||||||
await().atMost(20, TimeUnit.SECONDS).until(() -> Objects.equals(getRestAPIFactory().getHoldsAPI(userWithoutPermission)
|
await().atMost(20, TimeUnit.SECONDS).until(() ->
|
||||||
|
Objects.equals(getRestAPIFactory().getHoldsAPI(userWithoutPermission)
|
||||||
.getBulkStatus(hold.getId(), bulkOperationEntry.getBulkStatusId()).getStatus(), "DONE"));
|
.getBulkStatus(hold.getId(), bulkOperationEntry.getBulkStatusId()).getStatus(), "DONE"));
|
||||||
|
|
||||||
HoldBulkStatus holdBulkStatus = getRestAPIFactory().getHoldsAPI(userWithoutPermission)
|
HoldBulkStatus holdBulkStatus = getRestAPIFactory().getHoldsAPI(userWithoutPermission)
|
||||||
@@ -316,15 +314,17 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user without the write permission on one file When the user adds content from a site to a hold using the bulk API Then all processed items are added to the hold except the one that the user does not have write permission And the status of the bulk operation is DONE, contains the error message and the number of errors is 1
|
* Given a user without the write permission on one file
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* Then all processed items are added to the hold except the one that the user does not have write permission
|
||||||
|
* And the status of the bulk operation is DONE, contains the error message and the number of errors is 1
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessWithUserWithoutWritePermissionOnOneFile()
|
public void testBulkProcessWithUserWithoutWritePermissionOnOneFile()
|
||||||
{
|
{
|
||||||
hold2 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
hold2 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
||||||
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
||||||
.reason(HOLD_REASON).build(),
|
.reason(HOLD_REASON).build(), FILE_PLAN_ALIAS);
|
||||||
FILE_PLAN_ALIAS);
|
|
||||||
holds.add(hold2);
|
holds.add(hold2);
|
||||||
|
|
||||||
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
||||||
@@ -345,14 +345,15 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Wait until all files are added to the hold.");
|
STEP("Wait until all files are added to the hold.");
|
||||||
await().atMost(30, TimeUnit.SECONDS).until(
|
await().atMost(30, TimeUnit.SECONDS).until(
|
||||||
() -> getRestAPIFactory().getHoldsAPI(getAdminUser()).getChildren(hold2.getId()).getEntries().size() == NUMBER_OF_FILES - 1);
|
() -> getRestAPIFactory().getHoldsAPI(getAdminUser()).getChildren(hold2.getId()).getEntries().size()
|
||||||
|
== NUMBER_OF_FILES - 1);
|
||||||
await().atMost(30, TimeUnit.SECONDS).until(
|
await().atMost(30, TimeUnit.SECONDS).until(
|
||||||
() -> getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
() -> getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
||||||
.getBulkStatus(hold2.getId(), bulkOperationEntry.getBulkStatusId()).getProcessedItems() == NUMBER_OF_FILES);
|
.getBulkStatus(hold2.getId(), bulkOperationEntry.getBulkStatusId()).getProcessedItems()
|
||||||
|
== NUMBER_OF_FILES);
|
||||||
List<String> holdChildrenNodeRefs = getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
List<String> holdChildrenNodeRefs = getRestAPIFactory().getHoldsAPI(userAddHoldPermission)
|
||||||
.getChildren(hold2.getId()).getEntries().stream().map(HoldChildEntry::getEntry).map(
|
.getChildren(hold2.getId()).getEntries().stream().map(HoldChildEntry::getEntry).map(
|
||||||
HoldChild::getId)
|
HoldChild::getId).toList();
|
||||||
.toList();
|
|
||||||
assertEquals(addedFiles.stream().skip(1).map(FileModel::getNodeRefWithoutVersion).sorted().toList(),
|
assertEquals(addedFiles.stream().skip(1).map(FileModel::getNodeRefWithoutVersion).sorted().toList(),
|
||||||
holdChildrenNodeRefs.stream().sorted().toList());
|
holdChildrenNodeRefs.stream().sorted().toList());
|
||||||
|
|
||||||
@@ -374,7 +375,9 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an unauthenticated user When the user adds content from a site to a hold using the bulk API Then the user receives unauthorized error
|
* Given an unauthenticated user
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* Then the user receives unauthorized error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessAsUnauthenticatedUser()
|
public void testBulkProcessAsUnauthenticatedUser()
|
||||||
@@ -388,7 +391,10 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API And the hold does not exist Then the user receives not found error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* And the hold does not exist
|
||||||
|
* Then the user receives not found error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessForNonExistentHold()
|
public void testBulkProcessForNonExistentHold()
|
||||||
@@ -401,7 +407,10 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API and the bulk operation is invalid Then the user receives bad request error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* and the bulk operation is invalid
|
||||||
|
* Then the user receives bad request error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGetBulkStatusesForInvalidOperation()
|
public void testGetBulkStatusesForInvalidOperation()
|
||||||
@@ -417,7 +426,10 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API And the hold does not exist Then the user receives not found error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* And the hold does not exist
|
||||||
|
* Then the user receives not found error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGetBulkStatusForNonExistentHold()
|
public void testGetBulkStatusForNonExistentHold()
|
||||||
@@ -430,7 +442,10 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API And the bulk status does not exist Then the user receives not found error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* And the bulk status does not exist
|
||||||
|
* Then the user receives not found error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGetBulkStatusForNonExistentBulkStatus()
|
public void testGetBulkStatusForNonExistentBulkStatus()
|
||||||
@@ -443,7 +458,10 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API And the hold does not exist Then the user receives not found error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* And the hold does not exist
|
||||||
|
* Then the user receives not found error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGetBulkStatusesForNonExistentHold()
|
public void testGetBulkStatusesForNonExistentHold()
|
||||||
@@ -456,7 +474,9 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from all sites to a hold using the bulk API to exceed the limit (30 items) Then the user receives bad request error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from all sites to a hold using the bulk API to exceed the limit (30 items)
|
||||||
|
* Then the user receives bad request error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testExceedingBulkOperationLimit()
|
public void testExceedingBulkOperationLimit()
|
||||||
@@ -477,15 +497,17 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API And then the user cancels the bulk operation Then the user receives OK status code
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* And then the user cancels the bulk operation
|
||||||
|
* Then the user receives OK status code
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessCancellationWithAllowedUser()
|
public void testBulkProcessCancellationWithAllowedUser()
|
||||||
{
|
{
|
||||||
Hold hold4 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
Hold hold4 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
||||||
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
||||||
.reason(HOLD_REASON).build(),
|
.reason(HOLD_REASON).build(), FILE_PLAN_ALIAS);
|
||||||
FILE_PLAN_ALIAS);
|
|
||||||
holds.add(hold4);
|
holds.add(hold4);
|
||||||
|
|
||||||
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
||||||
@@ -509,15 +531,17 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a user with the add to hold capability and hold filing permission When the user adds content from a site to a hold using the bulk API And a 2nd user without the add to hold capability cancels the bulk operation Then the 2nd user receives access denied error
|
* Given a user with the add to hold capability and hold filing permission
|
||||||
|
* When the user adds content from a site to a hold using the bulk API
|
||||||
|
* And a 2nd user without the add to hold capability cancels the bulk operation
|
||||||
|
* Then the 2nd user receives access denied error
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testBulkProcessCancellationWithUserWithoutAddToHoldCapability()
|
public void testBulkProcessCancellationWithUserWithoutAddToHoldCapability()
|
||||||
{
|
{
|
||||||
Hold hold5 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
Hold hold5 = getRestAPIFactory().getFilePlansAPI(getAdminUser()).createHold(
|
||||||
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
Hold.builder().name("HOLD" + generateTestPrefix(AddToHoldsV1Tests.class)).description(HOLD_DESCRIPTION)
|
||||||
.reason(HOLD_REASON).build(),
|
.reason(HOLD_REASON).build(), FILE_PLAN_ALIAS);
|
||||||
FILE_PLAN_ALIAS);
|
|
||||||
holds.add(hold5);
|
holds.add(hold5);
|
||||||
|
|
||||||
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
UserModel userAddHoldPermission = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
||||||
@@ -533,7 +557,8 @@ public class AddToHoldsBulkV1Tests extends BaseRMRestTest
|
|||||||
assertEquals(NUMBER_OF_FILES, bulkOperationEntry.getTotalItems());
|
assertEquals(NUMBER_OF_FILES, bulkOperationEntry.getTotalItems());
|
||||||
|
|
||||||
UserModel userWithoutAddToHoldCapability = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
UserModel userWithoutAddToHoldCapability = roleService.createUserWithSiteRoleRMRoleAndPermission(testSite,
|
||||||
UserRole.SiteCollaborator,
|
UserRole
|
||||||
|
.SiteCollaborator,
|
||||||
hold5.getId(), UserRoles.ROLE_RM_POWER_USER, PERMISSION_FILING);
|
hold5.getId(), UserRoles.ROLE_RM_POWER_USER, PERMISSION_FILING);
|
||||||
users.add(userWithoutAddToHoldCapability);
|
users.add(userWithoutAddToHoldCapability);
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ import org.alfresco.rest.v0.RMRolesAndActionsAPI;
|
|||||||
import org.alfresco.rest.v0.RecordsAPI;
|
import org.alfresco.rest.v0.RecordsAPI;
|
||||||
import org.alfresco.rest.v0.RecordCategoriesAPI;
|
import org.alfresco.rest.v0.RecordCategoriesAPI;
|
||||||
import org.alfresco.test.AlfrescoTest;
|
import org.alfresco.test.AlfrescoTest;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang.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;
|
||||||
|
@@ -144,5 +144,3 @@ public class CreateElectronicRecordsTests extends BaseRMRestTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -234,4 +234,3 @@ public class MoveToRuleOnFoldersTest extends BaseRMRestTest{
|
|||||||
assertStatusCode(OK);
|
assertStatusCode(OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ import org.alfresco.rest.v0.service.DispositionScheduleService;
|
|||||||
import org.alfresco.test.AlfrescoTest;
|
import org.alfresco.test.AlfrescoTest;
|
||||||
import org.alfresco.utility.model.RepoTestModel;
|
import org.alfresco.utility.model.RepoTestModel;
|
||||||
import org.alfresco.utility.model.UserModel;
|
import org.alfresco.utility.model.UserModel;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang.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;
|
||||||
|
@@ -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)](http://docs.alfresco.com/rm2.4/concepts/welcome-rm.html)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
@@ -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](http://docs.alfresco.com/rm-community/concepts/welcome-rm.html)
|
||||||
* [Enterprise Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services/23.4/Alfresco-Governance-Services/Introduction)
|
* [Enterprise Documentation Link](http://docs.alfresco.com/rm/concepts/welcome-rm.html)
|
||||||
* [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](http://docs.alfresco.com/5.2/concepts/dev-for-developers.html) 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](http://docs.alfresco.com/5.2/concepts/dev-arch-overview.html)
|
||||||
* [Platform Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Extension-Points-Overview)
|
* [Platform Extensions](http://docs.alfresco.com/5.2/concepts/dev-platform-extensions.html)
|
||||||
* [Share Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Share-UI-Extension-Points)
|
* [Share Extensions](http://docs.alfresco.com/5.2/concepts/dev-extensions-share.html)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
@@ -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](http://docs.alfresco.com/5.2/references/dev-extension-points-webscripts.html) is older and not recommended for integrations. The [v1 API](http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome-aara.html) 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](http://docs.alfresco.com/5.2/concepts/java-public-api-list.html), 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](http://docs.alfresco.com/5.2/references/dev-extension-points-content-model.html) to store RM metadata. We extend the [Alfresco patching mechanism](http://docs.alfresco.com/5.2/references/dev-extension-points-patch.html) 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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
SOLR6_TAG=2.0.13
|
SOLR6_TAG=2.0.14
|
||||||
POSTGRES_TAG=15.4
|
POSTGRES_TAG=16.6
|
||||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||||
|
@@ -119,11 +119,6 @@ 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.
|
||||||
|
@@ -34,7 +34,4 @@
|
|||||||
<!-- content cleanser -->
|
<!-- content cleanser -->
|
||||||
<bean id="contentCleanser.522022M" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanser522022M"/>
|
<bean id="contentCleanser.522022M" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanser522022M"/>
|
||||||
|
|
||||||
<!-- content cleanser -->
|
|
||||||
<bean id="contentCleanser.SevenPass" class="org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanserSevenPass"/>
|
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -611,7 +611,6 @@
|
|||||||
<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">
|
||||||
|
@@ -35,4 +35,3 @@
|
|||||||
}
|
}
|
||||||
</#escape>
|
</#escape>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
|
@@ -219,4 +219,3 @@ function getRecordFolder(recordFolder, parentPath)
|
|||||||
|
|
||||||
// Start webscript
|
// Start webscript
|
||||||
main();
|
main();
|
||||||
|
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<images>
|
<images>
|
||||||
<image>
|
<image>
|
||||||
<name>postgres:15.4</name>
|
<name>postgres:16.6</name>
|
||||||
<run>
|
<run>
|
||||||
<ports>
|
<ports>
|
||||||
<port>${postgresql.tests.port}:${postgresql.port}</port>
|
<port>${postgresql.tests.port}:${postgresql.port}</port>
|
||||||
|
@@ -190,4 +190,3 @@ public final class NamePathDataExtractor extends AbstractDataExtractor
|
|||||||
return Objects.hash(nodeService, filePlanService, ruleService);
|
return Objects.hash(nodeService, filePlanService, ruleService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -120,4 +120,3 @@ public class RecordsManagementBootstrap extends AbstractLifecycleBean
|
|||||||
// NOOP
|
// NOOP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,4 +43,3 @@ public record BulkOperation(Query searchQuery, String operationType) implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -88,4 +88,3 @@ public class AssocPolicy extends AbstractBasePolicy
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -141,5 +141,3 @@ public class NotifyOfRecordsDueForReviewJobExecuter extends RecordsManagementJob
|
|||||||
} // end of execute method
|
} // end of execute method
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -103,4 +103,3 @@ public class RMv23SavedSearchesPatch extends AbstractModulePatch
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -58,4 +58,3 @@ public class PropertyValuesOfChildrenQueryParams
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -34,12 +34,6 @@ import java.util.HashSet;
|
|||||||
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.event.ContextRefreshedEvent;
|
|
||||||
import org.springframework.dao.ConcurrencyFailureException;
|
|
||||||
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;
|
||||||
@@ -48,10 +42,7 @@ import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
|
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
|
||||||
import org.alfresco.query.PagingRequest;
|
import org.alfresco.query.PagingRequest;
|
||||||
import org.alfresco.query.PagingResults;
|
import org.alfresco.query.PagingResults;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
|
||||||
import org.alfresco.repo.security.authority.RMAuthority;
|
import org.alfresco.repo.security.authority.RMAuthority;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
|
||||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.DuplicateChildNodeNameException;
|
import org.alfresco.service.cmr.repository.DuplicateChildNodeNameException;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
@@ -63,6 +54,12 @@ import org.alfresco.service.namespace.RegexQNamePattern;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
import org.alfresco.util.ParameterCheck;
|
import org.alfresco.util.ParameterCheck;
|
||||||
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.context.event.ContextRefreshedEvent;
|
||||||
|
import org.springframework.extensions.webscripts.ui.common.StringUtils;
|
||||||
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
|
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||||
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extended security service implementation.
|
* Extended security service implementation.
|
||||||
@@ -98,11 +95,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
|
|
||||||
*/
|
*/
|
||||||
public void setFilePlanService(FilePlanService filePlanService)
|
public void setFilePlanService(FilePlanService filePlanService)
|
||||||
{
|
{
|
||||||
@@ -110,8 +104,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param filePlanRoleService
|
* @param filePlanRoleService file plan role service
|
||||||
* file plan role service
|
|
||||||
*/
|
*/
|
||||||
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
|
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
|
||||||
{
|
{
|
||||||
@@ -119,8 +112,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param authorityService
|
* @param authorityService authority service
|
||||||
* authority service
|
|
||||||
*/
|
*/
|
||||||
public void setAuthorityService(AuthorityService authorityService)
|
public void setAuthorityService(AuthorityService authorityService)
|
||||||
{
|
{
|
||||||
@@ -128,8 +120,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param permissionService
|
* @param permissionService permission service
|
||||||
* permission service
|
|
||||||
*/
|
*/
|
||||||
public void setPermissionService(PermissionService permissionService)
|
public void setPermissionService(PermissionService permissionService)
|
||||||
{
|
{
|
||||||
@@ -137,23 +128,13 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param transactionService
|
* @param transactionService transaction service
|
||||||
* transaction service
|
|
||||||
*/
|
*/
|
||||||
public void setTransactionService(TransactionService transactionService)
|
public void setTransactionService(TransactionService transactionService)
|
||||||
{
|
{
|
||||||
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
|
||||||
*/
|
*/
|
||||||
@@ -161,10 +142,12 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent)
|
public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent)
|
||||||
{
|
{
|
||||||
// run as System on bootstrap
|
// run as System on bootstrap
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Object>() {
|
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||||
|
{
|
||||||
public Object doWork()
|
public Object doWork()
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>() {
|
RetryingTransactionCallback<Void> callback = new RetryingTransactionCallback<Void>()
|
||||||
|
{
|
||||||
public Void execute()
|
public Void execute()
|
||||||
{
|
{
|
||||||
// if the root group doesn't exist then create it
|
// if the root group doesn't exist then create it
|
||||||
@@ -241,8 +224,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Helper to get authorities for a given group
|
* Helper to get authorities for a given group
|
||||||
*
|
*
|
||||||
* @param group
|
* @param group group name
|
||||||
* group name
|
|
||||||
* @return Set<String> immediate authorities
|
* @return Set<String> immediate authorities
|
||||||
*/
|
*/
|
||||||
private Set<String> getAuthorities(String group)
|
private Set<String> getAuthorities(String group)
|
||||||
@@ -302,8 +284,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
* <p>
|
* <p>
|
||||||
* Return null if none found.
|
* Return null if none found.
|
||||||
*
|
*
|
||||||
* @param nodeRef
|
* @param nodeRef node reference
|
||||||
* node reference
|
|
||||||
* @return Pair<String, String> where first is the read group and second if the write group, null if none found
|
* @return Pair<String, String> where first is the read group and second if the write group, null if none found
|
||||||
*/
|
*/
|
||||||
private Pair<String, String> getIPRGroups(NodeRef nodeRef)
|
private Pair<String, String> getIPRGroups(NodeRef nodeRef)
|
||||||
@@ -340,17 +321,17 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Given a set of readers and writers find or create the appropriate IPR groups.
|
* Given a set of readers and writers find or create the appropriate IPR groups.
|
||||||
* <p>
|
* <p>
|
||||||
* The IPR groups are named with hashes of the authority lists in order to reduce the set of groups that require exact match. A further index is used to handle a situation where there is a hash clash, but a difference in the authority lists.
|
* The IPR groups are named with hashes of the authority lists in order to reduce
|
||||||
|
* the set of groups that require exact match. A further index is used to handle
|
||||||
|
* a situation where there is a hash clash, but a difference in the authority lists.
|
||||||
* <p>
|
* <p>
|
||||||
* When no match is found the groups are created. Once created
|
* When no match is found the groups are created. Once created
|
||||||
*
|
*
|
||||||
* @param filePlan
|
* @param filePlan file plan
|
||||||
* file plan
|
* @param readers authorities with read
|
||||||
* @param readers
|
* @param writers authorities with write
|
||||||
* authorities with read
|
* @return Pair<String, String> where first is the full name of the read group and
|
||||||
* @param writers
|
* second is the full name of the write group
|
||||||
* authorities with write
|
|
||||||
* @return Pair<String, String> where first is the full name of the read group and second is the full name of the write group
|
|
||||||
*/
|
*/
|
||||||
private Pair<String, String> createOrFindIPRGroups(Set<String> readers, Set<String> writers)
|
private Pair<String, String> createOrFindIPRGroups(Set<String> readers, Set<String> writers)
|
||||||
{
|
{
|
||||||
@@ -362,28 +343,20 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Create or find an IPR group based on the provided prefix and authorities.
|
* Create or find an IPR group based on the provided prefix and authorities.
|
||||||
*
|
*
|
||||||
* @param groupPrefix
|
* @param groupPrefix group prefix
|
||||||
* group prefix
|
* @param authorities authorities
|
||||||
* @param authorities
|
|
||||||
* authorities
|
|
||||||
* @return String full group name
|
* @return String full group name
|
||||||
*/
|
*/
|
||||||
private String createOrFindIPRGroup(String groupPrefix, Set<String> authorities)
|
private String createOrFindIPRGroup(String groupPrefix, Set<String> authorities)
|
||||||
{
|
{
|
||||||
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, authoritySet);
|
Pair<String, Integer> groupResult = findIPRGroup(groupPrefix, authorities);
|
||||||
|
|
||||||
if (groupResult.getFirst() == null)
|
if (groupResult.getFirst() == null)
|
||||||
{
|
{
|
||||||
group = createIPRGroup(groupPrefix, authoritySet, groupResult.getSecond());
|
group = createIPRGroup(groupPrefix, authorities, groupResult.getSecond());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -396,13 +369,13 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Given a group name prefix and the authorities, finds the exact match existing group.
|
* Given a group name prefix and the authorities, finds the exact match existing group.
|
||||||
* <p>
|
* <p>
|
||||||
* If the group does not exist then the group returned is null and the index shows the next available group index for creation.
|
* If the group does not exist then the group returned is null and the index shows the next available
|
||||||
|
* group index for creation.
|
||||||
*
|
*
|
||||||
* @param groupPrefix
|
* @param groupPrefix group name prefix
|
||||||
* group name prefix
|
* @param authorities authorities
|
||||||
* @param authorities
|
* @return Pair<String, Integer> where first is the name of the found group, null if none found and second
|
||||||
* authorities
|
* if the next available create index
|
||||||
* @return Pair<String, Integer> where first is the name of the found group, null if none found and second if the next available create index
|
|
||||||
*/
|
*/
|
||||||
private Pair<String, Integer> findIPRGroup(String groupPrefix, Set<String> authorities)
|
private Pair<String, Integer> findIPRGroup(String groupPrefix, Set<String> authorities)
|
||||||
{
|
{
|
||||||
@@ -418,13 +391,12 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
while (hasMoreItems == true)
|
while (hasMoreItems == true)
|
||||||
{
|
{
|
||||||
// get matching authorities
|
// get matching authorities
|
||||||
PagingResults<String> results = authorityService.getAuthorities(
|
PagingResults<String> results = authorityService.getAuthorities(AuthorityType.GROUP,
|
||||||
AuthorityType.GROUP,
|
|
||||||
RMAuthority.ZONE_APP_RM,
|
RMAuthority.ZONE_APP_RM,
|
||||||
groupShortNamePrefix,
|
groupShortNamePrefix,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
new PagingRequest(MAX_ITEMS * pageCount, MAX_ITEMS));
|
new PagingRequest(MAX_ITEMS*pageCount, MAX_ITEMS));
|
||||||
|
|
||||||
// record the total count
|
// record the total count
|
||||||
nextGroupIndex = nextGroupIndex + results.getPage().size();
|
nextGroupIndex = nextGroupIndex + results.getPage().size();
|
||||||
@@ -441,81 +413,22 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
|
|
||||||
// determine if there are any more pages to inspect
|
// determine if there are any more pages to inspect
|
||||||
hasMoreItems = results.hasMoreItems();
|
hasMoreItems = results.hasMoreItems();
|
||||||
pageCount++;
|
pageCount ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
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.
|
||||||
*
|
*
|
||||||
* @param authorities
|
* @param authorities list of authorities
|
||||||
* list of authorities
|
* @param group group
|
||||||
* @param group
|
|
||||||
* group
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private boolean isIPRGroupTrueMatch(String group, Set<String> authorities)
|
private boolean isIPRGroupTrueMatch(String group, Set<String> authorities)
|
||||||
{
|
{
|
||||||
// Remove GROUP_EVERYONE for proper comparison as GROUP_EVERYONE is never included in an IPR group
|
//Remove GROUP_EVERYONE for proper comparison as GROUP_EVERYONE is never included in an IPR group
|
||||||
Set<String> plainAuthorities = new HashSet<String>();
|
Set<String> plainAuthorities = new HashSet<String>();
|
||||||
if (authorities != null)
|
if (authorities != null)
|
||||||
{
|
{
|
||||||
@@ -531,13 +444,11 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
* <p>
|
* <p>
|
||||||
* 'package' scope to help testing.
|
* 'package' scope to help testing.
|
||||||
*
|
*
|
||||||
* @param prefix
|
* @param prefix prefix
|
||||||
* prefix
|
* @param authorities authorities
|
||||||
* @param authorities
|
|
||||||
* authorities
|
|
||||||
* @return String group prefix short name
|
* @return String group prefix short name
|
||||||
*/
|
*/
|
||||||
/* package */ String getIPRGroupPrefixShortName(String prefix, Set<String> authorities)
|
/*package*/ String getIPRGroupPrefixShortName(String prefix, Set<String> authorities)
|
||||||
{
|
{
|
||||||
StringBuilder builder = new StringBuilder(128)
|
StringBuilder builder = new StringBuilder(128)
|
||||||
.append(prefix)
|
.append(prefix)
|
||||||
@@ -553,17 +464,13 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
* <p>
|
* <p>
|
||||||
* 'package' scope to help testing.
|
* 'package' scope to help testing.
|
||||||
*
|
*
|
||||||
* @param prefix
|
* @param prefix prefix
|
||||||
* prefix
|
* @param readers read authorities
|
||||||
* @param readers
|
* @param writers write authorities
|
||||||
* read authorities
|
* @param index group index
|
||||||
* @param writers
|
|
||||||
* write authorities
|
|
||||||
* @param index
|
|
||||||
* group index
|
|
||||||
* @return String group short name
|
* @return String group short name
|
||||||
*/
|
*/
|
||||||
/* package */ String getIPRGroupShortName(String prefix, Set<String> authorities, int index)
|
/*package*/ String getIPRGroupShortName(String prefix, Set<String> authorities, int index)
|
||||||
{
|
{
|
||||||
return getIPRGroupShortName(prefix, authorities, Integer.toString(index));
|
return getIPRGroupShortName(prefix, authorities, Integer.toString(index));
|
||||||
}
|
}
|
||||||
@@ -573,14 +480,10 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
* <p>
|
* <p>
|
||||||
* Note this excludes the "GROUP_" prefix.
|
* Note this excludes the "GROUP_" prefix.
|
||||||
*
|
*
|
||||||
* @param prefix
|
* @param prefix prefix
|
||||||
* prefix
|
* @param readers read authorities
|
||||||
* @param readers
|
* @param writers write authorities
|
||||||
* read authorities
|
* @param index group index
|
||||||
* @param writers
|
|
||||||
* write authorities
|
|
||||||
* @param index
|
|
||||||
* group index
|
|
||||||
* @return String group short name
|
* @return String group short name
|
||||||
*/
|
*/
|
||||||
private String getIPRGroupShortName(String prefix, Set<String> authorities, String index)
|
private String getIPRGroupShortName(String prefix, Set<String> authorities, String index)
|
||||||
@@ -595,8 +498,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Gets the hashcode value of a set of authorities.
|
* Gets the hashcode value of a set of authorities.
|
||||||
*
|
*
|
||||||
* @param authorities
|
* @param authorities set of authorities
|
||||||
* set of authorities
|
|
||||||
* @return int hash code
|
* @return int hash code
|
||||||
*/
|
*/
|
||||||
private int getAuthoritySetHashCode(Set<String> authorities)
|
private int getAuthoritySetHashCode(Set<String> authorities)
|
||||||
@@ -612,12 +514,9 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Creates a new IPR group.
|
* Creates a new IPR group.
|
||||||
*
|
*
|
||||||
* @param groupNamePrefix
|
* @param groupNamePrefix group name prefix
|
||||||
* group name prefix
|
* @param children child authorities
|
||||||
* @param children
|
* @param index group index
|
||||||
* child authorities
|
|
||||||
* @param index
|
|
||||||
* group index
|
|
||||||
* @return String full name of created group
|
* @return String full name of created group
|
||||||
*/
|
*/
|
||||||
private String createIPRGroup(String groupNamePrefix, Set<String> children, int index)
|
private String createIPRGroup(String groupNamePrefix, Set<String> children, int index)
|
||||||
@@ -648,10 +547,10 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (DuplicateChildNodeNameException ex)
|
catch(DuplicateChildNodeNameException ex)
|
||||||
{
|
{
|
||||||
// Rethrow as ConcurrencyFailureException so that is can be retried and linked to the group created by the concurrent transaction
|
// the group was concurrently created
|
||||||
throw new ConcurrencyFailureException("IPR group creation failed due to concurrent duplicate group name creation: " + groupShortName);
|
group = authorityService.getName(AuthorityType.GROUP, groupShortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
@@ -660,10 +559,8 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Assign IPR groups to a node reference with the correct permissions.
|
* Assign IPR groups to a node reference with the correct permissions.
|
||||||
*
|
*
|
||||||
* @param iprGroups
|
* @param iprGroups iprGroups, first read and second write
|
||||||
* iprGroups, first read and second write
|
* @param nodeRef node reference
|
||||||
* @param nodeRef
|
|
||||||
* node reference
|
|
||||||
*/
|
*/
|
||||||
private void assignIPRGroupsToNode(Pair<String, String> iprGroups, NodeRef nodeRef)
|
private void assignIPRGroupsToNode(Pair<String, String> iprGroups, NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
@@ -701,8 +598,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* Clear the nodes IPR permissions
|
* Clear the nodes IPR permissions
|
||||||
*
|
*
|
||||||
* @param nodeRef
|
* @param nodeRef node reference
|
||||||
* node reference
|
|
||||||
*/
|
*/
|
||||||
private void clearPermissions(NodeRef nodeRef, Pair<String, String> iprGroups)
|
private void clearPermissions(NodeRef nodeRef, Pair<String, String> iprGroups)
|
||||||
{
|
{
|
||||||
@@ -714,9 +610,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#getExtendedReaders(org.alfresco.service.cmr.repository.NodeRef)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#getExtendedReaders(org.alfresco.service.cmr.repository.NodeRef)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public Set<String> getExtendedReaders(NodeRef nodeRef)
|
||||||
@Deprecated
|
|
||||||
public Set<String> getExtendedReaders(NodeRef nodeRef)
|
|
||||||
{
|
{
|
||||||
return getReaders(nodeRef);
|
return getReaders(nodeRef);
|
||||||
}
|
}
|
||||||
@@ -724,9 +618,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#getExtendedWriters(org.alfresco.service.cmr.repository.NodeRef)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#getExtendedWriters(org.alfresco.service.cmr.repository.NodeRef)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public Set<String> getExtendedWriters(NodeRef nodeRef)
|
||||||
@Deprecated
|
|
||||||
public Set<String> getExtendedWriters(NodeRef nodeRef)
|
|
||||||
{
|
{
|
||||||
return getWriters(nodeRef);
|
return getWriters(nodeRef);
|
||||||
}
|
}
|
||||||
@@ -734,9 +626,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#addExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#addExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
|
||||||
@Deprecated
|
|
||||||
public void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
|
|
||||||
{
|
{
|
||||||
set(nodeRef, readers, writers);
|
set(nodeRef, readers, writers);
|
||||||
}
|
}
|
||||||
@@ -744,9 +634,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#addExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set, boolean)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#addExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set, boolean)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
|
||||||
@Deprecated
|
|
||||||
public void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
|
|
||||||
{
|
{
|
||||||
set(nodeRef, readers, writers);
|
set(nodeRef, readers, writers);
|
||||||
}
|
}
|
||||||
@@ -754,9 +642,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeAllExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeAllExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public void removeAllExtendedSecurity(NodeRef nodeRef)
|
||||||
@Deprecated
|
|
||||||
public void removeAllExtendedSecurity(NodeRef nodeRef)
|
|
||||||
{
|
{
|
||||||
remove(nodeRef);
|
remove(nodeRef);
|
||||||
}
|
}
|
||||||
@@ -764,9 +650,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
|
||||||
@Deprecated
|
|
||||||
public void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers)
|
|
||||||
{
|
{
|
||||||
remove(nodeRef);
|
remove(nodeRef);
|
||||||
}
|
}
|
||||||
@@ -774,9 +658,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set, boolean)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, java.util.Set, java.util.Set, boolean)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String>writers, boolean applyToParents)
|
||||||
@Deprecated
|
|
||||||
public void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents)
|
|
||||||
{
|
{
|
||||||
remove(nodeRef);
|
remove(nodeRef);
|
||||||
}
|
}
|
||||||
@@ -784,9 +666,7 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeAllExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, boolean)
|
* @see org.alfresco.module.org_alfresco_module_rm.security.DeprecatedExtendedSecurityService#removeAllExtendedSecurity(org.alfresco.service.cmr.repository.NodeRef, boolean)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override @Deprecated public void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents)
|
||||||
@Deprecated
|
|
||||||
public void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents)
|
|
||||||
{
|
{
|
||||||
remove(nodeRef);
|
remove(nodeRef);
|
||||||
}
|
}
|
||||||
|
@@ -71,4 +71,3 @@ public class CustomLocalDateDeserializer extends StdDeserializer<LocalDate>
|
|||||||
return LOCAL_DATE_OPTIONAL_TIME_PARSER.parseLocalDate(str);
|
return LOCAL_DATE_OPTIONAL_TIME_PARSER.parseLocalDate(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -29,23 +29,14 @@ 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;
|
||||||
@@ -82,7 +73,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
|
|
||||||
private String createTestUser()
|
private String createTestUser()
|
||||||
{
|
{
|
||||||
return doTestInTransaction(new Test<String>() {
|
return doTestInTransaction(new Test<String>()
|
||||||
|
{
|
||||||
public String run()
|
public String run()
|
||||||
{
|
{
|
||||||
String userName = GUID.generate();
|
String userName = GUID.generate();
|
||||||
@@ -98,7 +90,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
final String elephant = createTestUser();
|
final String elephant = createTestUser();
|
||||||
final String snake = createTestUser();
|
final String snake = createTestUser();
|
||||||
|
|
||||||
doTestInTransaction(new Test<Void>() {
|
doTestInTransaction(new Test<Void>()
|
||||||
|
{
|
||||||
public Void run()
|
public Void run()
|
||||||
{
|
{
|
||||||
assertFalse(extendedSecurityService.hasExtendedSecurity(filePlan));
|
assertFalse(extendedSecurityService.hasExtendedSecurity(filePlan));
|
||||||
@@ -140,7 +133,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
final String monkey = createTestUser();
|
final String monkey = createTestUser();
|
||||||
final String elephant = createTestUser();
|
final String elephant = createTestUser();
|
||||||
|
|
||||||
doTestInTransaction(new Test<Void>() {
|
doTestInTransaction(new Test<Void>()
|
||||||
|
{
|
||||||
Set<String> extendedReaders = new HashSet<>(2);
|
Set<String> extendedReaders = new HashSet<>(2);
|
||||||
|
|
||||||
public Void run() throws Exception
|
public Void run() throws Exception
|
||||||
@@ -195,7 +189,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
final String userWrite = createTestUser();
|
final String userWrite = createTestUser();
|
||||||
final String siteShortName = GUID.generate();
|
final String siteShortName = GUID.generate();
|
||||||
|
|
||||||
doTestInTransaction(new Test<Void>() {
|
doTestInTransaction(new Test<Void>()
|
||||||
|
{
|
||||||
public Void run() throws Exception
|
public Void run() throws Exception
|
||||||
{
|
{
|
||||||
siteService.createSite(null, siteShortName, "test", "test", SiteVisibility.PRIVATE);
|
siteService.createSite(null, siteShortName, "test", "test", SiteVisibility.PRIVATE);
|
||||||
@@ -203,7 +198,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
final NodeRef documentLibrary = doTestInTransaction(new Test<NodeRef>() {
|
final NodeRef documentLibrary = doTestInTransaction(new Test<NodeRef>()
|
||||||
|
{
|
||||||
public NodeRef run() throws Exception
|
public NodeRef run() throws Exception
|
||||||
{
|
{
|
||||||
siteService.setMembership(siteShortName, userRead, SiteModel.SITE_CONSUMER);
|
siteService.setMembership(siteShortName, userRead, SiteModel.SITE_CONSUMER);
|
||||||
@@ -212,20 +208,22 @@ 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)
|
NodeRef record = fileFolderService.create(documentLibrary, GUID.generate(), ContentModel.TYPE_CONTENT).getNodeRef();
|
||||||
.getNodeRef();
|
|
||||||
recordService.createRecord(filePlan, record);
|
recordService.createRecord(filePlan, record);
|
||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
doTestInTransaction(new Test<Void>() {
|
doTestInTransaction(new Test<Void>()
|
||||||
|
{
|
||||||
public Void run() throws Exception
|
public Void run() throws Exception
|
||||||
{
|
{
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// check permissions
|
// check permissions
|
||||||
@@ -235,7 +233,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
}, userNone);
|
}, userNone);
|
||||||
|
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// check permissions
|
// check permissions
|
||||||
@@ -245,7 +244,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
}, userRead);
|
}, userRead);
|
||||||
|
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// check permissions
|
// check permissions
|
||||||
@@ -255,7 +255,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
}, userWrite);
|
}, userWrite);
|
||||||
|
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// check permissions
|
// check permissions
|
||||||
@@ -265,7 +266,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
}, userNone);
|
}, userNone);
|
||||||
|
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// check permissions
|
// check permissions
|
||||||
@@ -275,7 +277,8 @@ public class ExtendedSecurityServiceImplTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
}, userRead);
|
}, userRead);
|
||||||
|
|
||||||
AuthenticationUtil.runAs(new RunAsWork<Void>() {
|
AuthenticationUtil.runAs(new RunAsWork<Void>()
|
||||||
|
{
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// check permissions
|
// check permissions
|
||||||
@@ -289,238 +292,4 @@ 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -926,4 +926,3 @@ public class RMCaveatConfigScriptTest extends BaseRMWebScriptTestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -105,5 +105,3 @@ public class RMConstraintScriptTest extends BaseRMWebScriptTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,8 +3,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Version label
|
# Version label
|
||||||
version.major=23
|
version.major=25
|
||||||
version.minor=6
|
version.minor=1
|
||||||
version.revision=0
|
version.revision=0
|
||||||
version.label=
|
version.label=
|
||||||
|
|
||||||
|
@@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* #%L
|
|
||||||
* Alfresco Records Management Module
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2005 - 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.module.org_alfresco_module_rm.content.cleanser;
|
|
||||||
|
|
||||||
import static org.mockito.Mockito.times;
|
|
||||||
import static org.mockito.Mockito.verify;
|
|
||||||
import static org.mockito.Mockito.when;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.mockito.InjectMocks;
|
|
||||||
import org.mockito.Mock;
|
|
||||||
import org.mockito.Spy;
|
|
||||||
|
|
||||||
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
|
|
||||||
import org.alfresco.service.cmr.repository.ContentIOException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Eager content store cleaner unit test.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ContentCleanserSevenPassUnitTest extends BaseUnitTest
|
|
||||||
{
|
|
||||||
@InjectMocks
|
|
||||||
@Spy
|
|
||||||
private ContentCleanserSevenPass contentCleanserSevenPass = new ContentCleanserSevenPass()
|
|
||||||
{
|
|
||||||
/** dummy implementations */
|
|
||||||
@Override
|
|
||||||
protected void overwrite(File file, OverwriteOperation overwriteOperation)
|
|
||||||
{
|
|
||||||
// Intentionally left empty
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Mock
|
|
||||||
private File mockedFile;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Given that a file exists When I cleanse it Then the content is overwritten
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void cleanseFile()
|
|
||||||
{
|
|
||||||
when(mockedFile.exists()).thenReturn(true);
|
|
||||||
when(mockedFile.canWrite()).thenReturn(true);
|
|
||||||
contentCleanserSevenPass.cleanse(mockedFile);
|
|
||||||
verify(contentCleanserSevenPass, times(2)).overwrite(mockedFile, contentCleanserSevenPass.overwriteOnes);
|
|
||||||
verify(contentCleanserSevenPass, times(3)).overwrite(mockedFile, contentCleanserSevenPass.overwriteZeros);
|
|
||||||
verify(contentCleanserSevenPass, times(2)).overwrite(mockedFile, contentCleanserSevenPass.overwriteRandom);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Given that the file does not exist When I cleanse it Then an exception is thrown
|
|
||||||
*/
|
|
||||||
@Test(expected = ContentIOException.class)
|
|
||||||
public void fileDoesNotExist()
|
|
||||||
{
|
|
||||||
when(mockedFile.exists()).thenReturn(false);
|
|
||||||
when(mockedFile.canWrite()).thenReturn(true);
|
|
||||||
contentCleanserSevenPass.cleanse(mockedFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Given that I can not write to the file When I cleanse it Then an exception is thrown
|
|
||||||
*/
|
|
||||||
@Test(expected = ContentIOException.class)
|
|
||||||
public void cantWriteToFile()
|
|
||||||
{
|
|
||||||
when(mockedFile.exists()).thenReturn(true);
|
|
||||||
when(mockedFile.canWrite()).thenReturn(false);
|
|
||||||
contentCleanserSevenPass.cleanse(mockedFile);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -96,5 +96,3 @@ public class RMv32HoldReportUpdatePatchUnitTest
|
|||||||
verify(mockedContentWriter, times(1)).putContent((InputStream) any());
|
verify(mockedContentWriter, times(1)).putContent((InputStream) any());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -52,7 +52,6 @@ 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;
|
||||||
@@ -68,7 +67,6 @@ 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;
|
||||||
@@ -525,104 +523,6 @@ 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
|
||||||
|
@@ -47,4 +47,3 @@ public class RMYamlUnitTest extends BaseYamlUnitTest
|
|||||||
validateYamlFiles(getYamlFilesList(RM_COMMUNITY_YAML_FILES_PATH));
|
validateYamlFiles(getYamlFilesList(RM_COMMUNITY_YAML_FILES_PATH));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -3315,7 +3315,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
aspectNames:
|
aspectNames:
|
||||||
type: array
|
type: array
|
||||||
@@ -3346,7 +3346,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3396,7 +3396,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3429,7 +3429,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3484,7 +3484,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3549,7 +3549,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
properties:
|
properties:
|
||||||
type: object
|
type: object
|
||||||
@@ -3578,7 +3578,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3637,7 +3637,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3702,7 +3702,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
properties:
|
properties:
|
||||||
type: object
|
type: object
|
||||||
@@ -3729,7 +3729,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3779,7 +3779,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3881,7 +3881,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -3967,7 +3967,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4027,7 +4027,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4076,7 +4076,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4141,7 +4141,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
properties:
|
properties:
|
||||||
type: object
|
type: object
|
||||||
@@ -4166,7 +4166,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4223,7 +4223,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4830,7 +4830,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4852,7 +4852,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
pattern: "^(?!(.*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|]+.*)|(.*[\\.]?.*[\\.]+$)|(.*[ ]+$))"
|
||||||
description: |
|
description: |
|
||||||
The name must not contain spaces or the following special characters: * " < > \ / ? : and |.
|
The name must not contain spaces or the following special characters: * " `<` `>` \ / ? : and |.
|
||||||
The character . must not be used at the end of the name.
|
The character . must not be used at the end of the name.
|
||||||
nodeType:
|
nodeType:
|
||||||
type: string
|
type: string
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -51,8 +51,8 @@
|
|||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>commons-lang</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
import org.alfresco.service.cmr.site.SiteInfo;
|
import org.alfresco.service.cmr.site.SiteInfo;
|
||||||
import org.alfresco.service.cmr.wiki.WikiPageInfo;
|
import org.alfresco.service.cmr.wiki.WikiPageInfo;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang.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.unescapeHtml4(link));
|
WikiPageInfo wikiPage = wikiService.getWikiPage(site.getShortName(), StringEscapeUtils.unescapeHtml(link));
|
||||||
if (wikiPage != null)
|
if (wikiPage != null)
|
||||||
{
|
{
|
||||||
pageTitles.add(wikiPage.getTitle());
|
pageTitles.add(wikiPage.getTitle());
|
||||||
|
@@ -91,15 +91,6 @@ 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
|
||||||
*
|
*
|
||||||
@@ -133,28 +124,6 @@ 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(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,8 +181,6 @@ var Filters =
|
|||||||
|
|
||||||
case "favourites":
|
case "favourites":
|
||||||
for (var favourite in favourites)
|
for (var favourite in favourites)
|
||||||
{
|
|
||||||
if (favourite && favourite.trim() !== "")
|
|
||||||
{
|
{
|
||||||
if (filterQuery)
|
if (filterQuery)
|
||||||
{
|
{
|
||||||
@@ -190,7 +188,6 @@ var Filters =
|
|||||||
}
|
}
|
||||||
filterQuery += "ID:\"" + favourite + "\"";
|
filterQuery += "ID:\"" + favourite + "\"";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (filterQuery.length !== 0)
|
if (filterQuery.length !== 0)
|
||||||
{
|
{
|
||||||
@@ -204,13 +201,7 @@ var Filters =
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// empty favourites query
|
// empty favourites query
|
||||||
logger.warn("No favourites found for user: " + person.properties.userName);
|
filterQuery = "+ID:\"\"";
|
||||||
return {
|
|
||||||
query: null,
|
|
||||||
limitResults: 0,
|
|
||||||
sort: [],
|
|
||||||
language: "lucene"
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filterParams.query = filterQuery;
|
filterParams.query = filterQuery;
|
||||||
|
@@ -80,11 +80,6 @@ function runAction(p_params)
|
|||||||
{
|
{
|
||||||
result.fileExist = true;
|
result.fileExist = true;
|
||||||
}
|
}
|
||||||
if (error.indexOf("FolderExistsException") != -1)
|
|
||||||
{
|
|
||||||
result.fileExist = true;
|
|
||||||
result.type = "folder";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
results.push(result);
|
results.push(result);
|
||||||
|
@@ -45,7 +45,7 @@ import org.alfresco.service.cmr.wiki.WikiPageInfo;
|
|||||||
import org.alfresco.service.cmr.wiki.WikiService;
|
import org.alfresco.service.cmr.wiki.WikiService;
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang.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;
|
||||||
@@ -996,7 +996,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.unescapeHtml4(link));
|
WikiPageInfo wikiPage1 = this.wikiService.getWikiPage(SITE_SHORT_NAME_WIKI, StringEscapeUtils.unescapeHtml(link));
|
||||||
assertEquals(wikiPage2, wikiPage1);
|
assertEquals(wikiPage2, wikiPage1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2024 Alfresco Software Limited.
|
* Copyright (C) 2005-2025 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This file is part of Alfresco
|
* This file is part of Alfresco
|
||||||
*
|
*
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -118,6 +118,18 @@
|
|||||||
<groupId>org.jibx</groupId>
|
<groupId>org.jibx</groupId>
|
||||||
<artifactId>jibx-run</artifactId>
|
<artifactId>jibx-run</artifactId>
|
||||||
<version>1.4.2</version>
|
<version>1.4.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<!-- [ACS-5371] Excluded to avoid conflict in JDK9+ as it includes javax.xml-->
|
||||||
|
<exclusion>
|
||||||
|
<groupId>xpp3</groupId>
|
||||||
|
<artifactId>xpp3</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.kxml</groupId>
|
||||||
|
<artifactId>kxml2</artifactId>
|
||||||
|
<version>${dependency.kxml2.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Data model classes
|
* Alfresco Data model classes
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@@ -9,6 +9,6 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
</project>
|
</project>
|
||||||
|
@@ -37,6 +37,7 @@ 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/
|
||||||
@@ -145,6 +146,7 @@ libgif http://giflib.sourceforge.net/
|
|||||||
libfreetype http://www.freetype.org/
|
libfreetype http://www.freetype.org/
|
||||||
PostgreSQL http://www.postgresql.org/
|
PostgreSQL http://www.postgresql.org/
|
||||||
PostgreSQL JDBC Driver http://www.postgresql.org/
|
PostgreSQL JDBC Driver http://www.postgresql.org/
|
||||||
|
kXML 2 http://kxml.sourceforge.net/
|
||||||
|
|
||||||
|
|
||||||
=== CDDL 1.0 ===
|
=== CDDL 1.0 ===
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
SOLR6_TAG=2.0.13
|
SOLR6_TAG=2.0.14
|
||||||
POSTGRES_TAG=15.4
|
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>23.6.0.20</version>
|
<version>25.1.0.49</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](http://docs.alfresco.com/5.1/pra/1/topics/cmis-welcome.html).
|
||||||
|
|
||||||
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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<organization>
|
<organization>
|
||||||
|
@@ -16,7 +16,7 @@ import org.alfresco.utility.testrail.annotation.TestRail;
|
|||||||
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.lang3.time.DateUtils;
|
import org.apache.commons.lang.time.DateUtils;
|
||||||
import org.testng.annotations.BeforeClass;
|
import org.testng.annotations.BeforeClass;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>23.6.0.20</version>
|
<version>25.1.0.49</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
|
@@ -27,7 +27,7 @@ Back to [TAS Master Documentation](https://git.alfresco.com/tas/alfresco-tas-uti
|
|||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
**TAS**( **T**est **A**utomation **S**ystem)- **RESTAPI** is the project that handles the automated tests related only to [Alfresco REST API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/REST-API-Guide).
|
**TAS**( **T**est **A**utomation **S**ystem)- **RESTAPI** is the project that handles the automated tests related only to [Alfresco REST API](http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome.html).
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ restClient.onResponse().assertThat().body("entry.modifiedBy.firstName", org.hamc
|
|||||||
|
|
||||||
### How to generate models or check coverage
|
### How to generate models or check coverage
|
||||||
|
|
||||||
There are some simple generators that could parse [Swagger YAML](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/REST-API-Guide/Things-to-Know-Before-You-Start/The-API-Explorer-is-Your-Source-of-Truth) files and provide some usefull information to you like:
|
There are some simple generators that could parse [Swagger YAML](http://docs.alfresco.com/community/concepts/alfresco-sdk-tutorials-using-rest-api-explorer.html) files and provide some usefull information to you like:
|
||||||
|
|
||||||
a) Show on screen the actual coverage of TAS vs requests that exists in each YAML file - defined in pom.xml)
|
a) Show on screen the actual coverage of TAS vs requests that exists in each YAML file - defined in pom.xml)
|
||||||
|
|
||||||
|
@@ -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>23.6.0.20</version>
|
<version>25.1.0.49</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.18.0</commons-lang3.version>
|
<commons-lang3.version>3.17.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>
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
<artifactId>groovy</artifactId>
|
<artifactId>groovy</artifactId>
|
||||||
<version>3.0.22</version>
|
<version>3.0.23</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
|
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*-
|
||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
@@ -23,33 +23,27 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
package org.alfresco.repo.security.authentication.external;
|
package org.alfresco.rest.model;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.alfresco.repo.management.subsystems.ActivateableBean;
|
import org.alfresco.utility.model.TestModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A default {@link ExternalUserAuthenticator} implementation. Returns null to request a basic auth challenge.
|
* Authorization code implementation
|
||||||
*/
|
*/
|
||||||
public class DefaultWebScriptsHomeAuthenticator implements ExternalUserAuthenticator, ActivateableBean
|
public class RestAuthCodeModel extends TestModel
|
||||||
{
|
{
|
||||||
@Override
|
@JsonProperty
|
||||||
public String getUserId(HttpServletRequest request, HttpServletResponse response)
|
private String authorizationCode;
|
||||||
|
|
||||||
|
public String getAuthorizationCode()
|
||||||
{
|
{
|
||||||
return null;
|
return authorizationCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void setAuthorizationCode(String authorizationCode)
|
||||||
public void requestAuthentication(HttpServletRequest request, HttpServletResponse response)
|
|
||||||
{
|
{
|
||||||
// No implementation
|
this.authorizationCode = authorizationCode;
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isActive()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*-
|
||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
@@ -23,40 +23,27 @@
|
|||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
package org.alfresco.service.cmr.model;
|
package org.alfresco.rest.model;
|
||||||
|
|
||||||
import org.alfresco.api.AlfrescoPublicApi;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.utility.model.TestModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common exception thrown when an operation fails because of a name clash of folder.
|
* Authorization key implementation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@AlfrescoPublicApi
|
public class RestAuthKeyModel extends TestModel
|
||||||
public class FolderExistsException extends AlfrescoRuntimeException
|
|
||||||
{
|
{
|
||||||
private static final String MESSAGE_ID = "file_folder_service.file_exists_message";
|
@JsonProperty(required = true)
|
||||||
|
private String authorizationKey;
|
||||||
|
|
||||||
private static final long serialVersionUID = -4133713912784624118L;
|
public String getAuthorizationKey()
|
||||||
|
|
||||||
private NodeRef parentNodeRef;
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
public FolderExistsException(NodeRef parentNodeRef, String name)
|
|
||||||
{
|
{
|
||||||
super(MESSAGE_ID, new Object[]{name});
|
return authorizationKey;
|
||||||
this.parentNodeRef = parentNodeRef;
|
|
||||||
this.name = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NodeRef getParentNodeRef()
|
public void setAuthorizationKey(String authorizationKey)
|
||||||
{
|
{
|
||||||
return parentNodeRef;
|
this.authorizationKey = authorizationKey;
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* alfresco-tas-restapi
|
* alfresco-tas-restapi
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2024 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
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user