mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
216 Commits
feature/AC
...
25.3.0.1
Author | SHA1 | Date | |
---|---|---|---|
|
1e37b3308d | ||
|
84a36d68d4 | ||
|
40d475abf9 | ||
|
5d3f1f2402 | ||
|
2cd29d87ec | ||
|
8f1631fb55 | ||
|
5f6dced886 | ||
|
25fdc9ccc7 | ||
|
b6456cde34 | ||
|
27b80d8adb | ||
|
536e12ff76 | ||
|
96ab699ea8 | ||
|
9630d4cb02 | ||
|
fe9175d959 | ||
|
277d10133d | ||
|
3fb964a460 | ||
|
d630dcb7af | ||
|
7a673966aa | ||
|
65d2863b9d | ||
|
56ef484ae0 | ||
|
d619d5365e | ||
|
7096276b02 | ||
|
c9a46e1a8a | ||
|
98f9175a13 | ||
|
4e89b0a033 | ||
|
c6c0779984 | ||
|
554b26e7e7 | ||
|
93d704d44c | ||
|
0916efad7c | ||
|
6169ec0095 | ||
|
75ace2a268 | ||
|
f489c4193b | ||
|
71c3addf2d | ||
|
cc43f9338e | ||
|
45ad5045b1 | ||
|
773f99453e | ||
|
538d269f66 | ||
|
1dbf1c1314 | ||
|
3969cd8f14 | ||
|
eaa11fcb34 | ||
|
cd5c2227e2 | ||
|
757b26b1b8 | ||
|
0366449457 | ||
|
6827b2c7a1 | ||
|
36bc1dc1a4 | ||
|
8407159a17 | ||
|
917dd35c27 | ||
|
6e815ebd34 | ||
|
ad0668cce3 | ||
|
11fd7ca1dd | ||
|
6be0c3031f | ||
|
a1d869bdef | ||
|
d130c12f2a | ||
|
24e987e735 | ||
|
63e7492823 | ||
|
545a957a1b | ||
|
325e980cf0 | ||
|
e2a4dcc6ad | ||
|
a993c9ed97 | ||
|
85d2a5176b | ||
|
3c245ae64c | ||
|
fbf5966d10 | ||
|
8fca14df40 | ||
|
e38e7b4bda | ||
|
b378de58d8 | ||
|
8a64d9fb0b | ||
|
3c092b696d | ||
|
6f222106c5 | ||
|
bd5a016382 | ||
|
dc24718717 | ||
|
e65614d3c2 | ||
|
698f9b15ce | ||
|
09a254e5fd | ||
|
6f442a703a | ||
|
f1862c9636 | ||
|
231075fd5e | ||
|
979420879c | ||
|
db330e28f5 | ||
|
bae0573636 | ||
|
8089fc2572 | ||
|
1c4fe53c0f | ||
|
7a8aa1a2c1 | ||
|
e08ba1fd4f | ||
|
4f40bd0687 | ||
|
a3578f7baa | ||
|
8e8b9c868f | ||
|
f77b3b79e5 | ||
|
3a7157f4a7 | ||
|
d6b979f341 | ||
|
a090de4e71 | ||
|
03621db30a | ||
|
766a6def2b | ||
|
117804fb68 | ||
|
f03e6761ce | ||
|
74c8288206 | ||
|
c0bd0a680b | ||
|
8645cdc76d | ||
|
5055eec2df | ||
|
892f41d6fd | ||
|
075b02baee | ||
|
7c8a75ce6c | ||
|
cb0a925e27 | ||
|
c7d2699f7e | ||
|
b942b55193 | ||
|
c1100fe983 | ||
|
62236c90f5 | ||
|
eabdab91fb | ||
|
4f83076cfe | ||
|
7eda1d420f | ||
|
411388d62d | ||
|
245d1317ac | ||
|
ee5e34ca32 | ||
|
c4dcef73e1 | ||
|
4f53fee1fc | ||
|
d163410e3d | ||
|
9ca251edba | ||
|
193cb9b30d | ||
|
e9a36f67fe | ||
|
c18a58caea | ||
|
11659ab917 | ||
|
89b1049809 | ||
|
192c105719 | ||
|
b8fc8efa07 | ||
|
2e851cf88d | ||
|
ebf081c731 | ||
|
b979701264 | ||
|
aa0d02abf2 | ||
|
2f7b8d50a3 | ||
|
800736a025 | ||
|
b8b7e5193e | ||
|
808faa71b3 | ||
|
0bd476968b | ||
|
e51e5e8ca5 | ||
|
46db14d5ff | ||
|
b5fa73ca3b | ||
|
c962daae3b | ||
|
8efc559b09 | ||
|
08628732fc | ||
|
7f74bf7b3e | ||
|
390073b153 | ||
|
68c87f69c5 | ||
|
2b936050c8 | ||
|
28184ca69a | ||
|
e05c74813e | ||
|
e05a1d9ba9 | ||
|
5aab15a77a | ||
|
5d267c8d60 | ||
|
18fc9a58b4 | ||
|
6a7ba876b7 | ||
|
65bdb242ec | ||
|
5a537b301a | ||
|
515b894241 | ||
|
4978d9e790 | ||
|
bf8f5117ac | ||
|
cfb5cb2c6d | ||
|
71eed6822d | ||
|
b1fe69693c | ||
|
56d415fe4c | ||
|
8f4e617703 | ||
|
d8bdb82291 | ||
|
f2927a804e | ||
|
baba2090a8 | ||
|
dbb1bc11f4 | ||
|
9b53abdc98 | ||
|
58bff2bebf | ||
|
63fc98d100 | ||
|
60763787b4 | ||
|
6b6e6264a0 | ||
|
656eb16a38 | ||
|
447cf86ba6 | ||
|
dbf149779d | ||
|
cdcf2a7f9b | ||
|
9e4f07a010 | ||
|
c2bae9c53a | ||
|
7412553930 | ||
|
ca214ee58f | ||
|
bb261a1ddc | ||
|
920d34b289 | ||
|
9c65ffddc9 | ||
|
e817e7d64f | ||
|
f098334fba | ||
|
4d6ee95daf | ||
|
2ded9e6c4b | ||
|
6954f432ff | ||
|
494545b20d | ||
|
86c52f5d0e | ||
|
39ef9442fb | ||
|
388c12ab3e | ||
|
ebb0355692 | ||
|
53abde6bea | ||
|
4e990f918b | ||
|
416774e4a6 | ||
|
2c885bdd61 | ||
|
74380693d0 | ||
|
502ae6c02f | ||
|
de880c8273 | ||
|
658de4f7e6 | ||
|
b89ddc51c1 | ||
|
7c1ca67ef4 | ||
|
2388687eb0 | ||
|
637c349205 | ||
|
21434e1ce1 | ||
|
f49ce68c9e | ||
|
157430c0d6 | ||
|
9cddeb61c8 | ||
|
86980cb634 | ||
|
72fed7f913 | ||
|
13a83d9e22 | ||
|
a2735539ea | ||
|
1cb3931f21 | ||
|
0f5653e250 | ||
|
4a33ad8c3b | ||
|
85703f4284 | ||
|
127912aca9 | ||
|
70135ab771 | ||
|
fa516ef58f |
631
.github/workflows/ci.yml
vendored
631
.github/workflows/ci.yml
vendored
@@ -29,9 +29,6 @@ env:
|
|||||||
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_OIDC_ADMIN_CLIENT_ID }}
|
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_OIDC_ADMIN_CLIENT_ID }}
|
||||||
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_OIDC_CLIENT_SECRET }}
|
AUTH0_CLIENT_SECRET: ${{ secrets.AUTH0_OIDC_CLIENT_SECRET }}
|
||||||
AUTH0_ADMIN_PASSWORD: ${{ secrets.AUTH0_OIDC_ADMIN_PASSWORD }}
|
AUTH0_ADMIN_PASSWORD: ${{ secrets.AUTH0_OIDC_ADMIN_PASSWORD }}
|
||||||
# Report Portal settings
|
|
||||||
RP_LAUNCH_PREFIX: "${{ github.workflow }} - ${{ github.job }}"
|
|
||||||
RP_PROJECT: alfresco-backend
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
@@ -147,7 +144,7 @@ jobs:
|
|||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v8.16.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.16.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.16.0
|
||||||
- uses: Alfresco/ya-pmd-scan@v4.1.0
|
- uses: Alfresco/ya-pmd-scan@v4.3.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\""
|
||||||
|
|
||||||
@@ -182,52 +179,9 @@ jobs:
|
|||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v8.16.0
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testModule }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
run: |
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl ${{ matrix.testModule }} -am ${{ matrix.testAttributes }} -DfailIfNoTests=false "${args[@]}"
|
mvn -B test -pl ${{ matrix.testModule }} -am ${{ matrix.testAttributes }} -DfailIfNoTests=false "${args[@]}"
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -270,52 +224,8 @@ jobs:
|
|||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
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"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -345,52 +255,8 @@ jobs:
|
|||||||
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: ${{ matrix.version }}
|
MARIADB_VERSION: ${{ matrix.version }}
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.version }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -416,52 +282,8 @@ jobs:
|
|||||||
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.11
|
MARIADB_VERSION: 10.11
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -487,52 +309,8 @@ jobs:
|
|||||||
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
run: docker compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
||||||
env:
|
env:
|
||||||
MYSQL_VERSION: 8
|
MYSQL_VERSION: 8
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.cj.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -557,52 +335,8 @@ jobs:
|
|||||||
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.15
|
POSTGRES_VERSION: 14.15
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -627,52 +361,8 @@ jobs:
|
|||||||
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.10
|
POSTGRES_VERSION: 15.10
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -697,52 +387,8 @@ jobs:
|
|||||||
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: 16.6
|
POSTGRES_VERSION: 16.6
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -763,52 +409,8 @@ jobs:
|
|||||||
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"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=MessagingUnitTestSuite -DfailIfNoTests=false "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -879,52 +481,8 @@ jobs:
|
|||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
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"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.testSuite }} ${{ matrix.idp }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.mvn-options }} # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.mvn-options }} "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -986,59 +544,16 @@ jobs:
|
|||||||
- name: "Build TAS integration tests"
|
- name: "Build TAS integration tests"
|
||||||
if: ${{ matrix.test-name }} == 'Integration TAS tests'
|
if: ${{ matrix.test-name }} == 'Integration TAS tests'
|
||||||
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"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} - ${{ matrix.test-name }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: tests
|
id: tests
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: mvn -B verify -f packaging/tests/${{ matrix.pom-dir }}/pom.xml -Pall-tas-tests,${{ matrix.test-profile }} -Denvironment=default -DrunBugs=false
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B verify -f packaging/tests/${{ matrix.pom-dir }}/pom.xml -Pall-tas-tests,${{ matrix.test-profile }} -Denvironment=default -DrunBugs=false "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Print output after success"
|
- name: "Print output after success"
|
||||||
if: ${{ always() && steps.tests.outcome == 'success' }}
|
if: ${{ always() && steps.tests.outcome == 'success' }}
|
||||||
run: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/${{ matrix.pom-dir }}"
|
run: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/${{ matrix.pom-dir }}"
|
||||||
- name: "Print output after failure"
|
- name: "Print output after failure"
|
||||||
if: ${{ always() && steps.tests.outcome == 'failure' }}
|
if: ${{ always() && steps.tests.outcome == 'failure' }}
|
||||||
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/${{ matrix.pom-dir }}"
|
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/${{ matrix.pom-dir }}"
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -1059,52 +574,8 @@ jobs:
|
|||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run Postgres 16.6 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"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
id: run-tests
|
run: mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco # pragma: allowlist secret
|
||||||
env:
|
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -1134,23 +605,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/ci/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (PostgreSQL) ${{ matrix.test-name }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Verify"
|
- name: "Verify"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
env:
|
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }} "${args[@]}"
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -1180,23 +637,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/ci/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Prepare Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }} 0${{ matrix.part }} - (MySQL) ${{ matrix.test-name }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Verify"
|
- name: "Verify"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
env:
|
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }} "${args[@]}"
|
|
||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -1228,53 +671,9 @@ jobs:
|
|||||||
${{ env.TAS_SCRIPTS }}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
|
${{ env.TAS_SCRIPTS }}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
|
||||||
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
|
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
|
||||||
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"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-prepare@v8.16.0
|
|
||||||
id: rp-prepare
|
|
||||||
with:
|
|
||||||
rp-launch-prefix: ${{ env.RP_LAUNCH_PREFIX }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-use-static-launch-name: true
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Add GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
env:
|
|
||||||
RP_ENABLED: ${{ steps.rp-prepare.outputs.enabled }}
|
|
||||||
RP_KEY: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
RP_URL: ${{ steps.rp-prepare.outputs.url }}
|
|
||||||
run: bash scripts/ci/add_step_summary.sh
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Test"
|
- name: "Test"
|
||||||
id: run-tests
|
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
env:
|
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
|
||||||
RP_OPTS: ${{ github.ref_name == 'master' && steps.rp-prepare.outputs.mvn-opts || '' }}
|
|
||||||
run: |
|
|
||||||
eval "args=($RP_OPTS)"
|
|
||||||
mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests "${args[@]}"
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Update GitHub Step Summary"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
run: |
|
|
||||||
echo "#### ⏱ After Tests: $(date -u +'%Y-%m-%d %H:%M:%S%:z')" >> $GITHUB_STEP_SUMMARY
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Summarize Report Portal"
|
|
||||||
if: github.ref_name == 'master'
|
|
||||||
uses: Alfresco/alfresco-build-tools/.github/actions/reportportal-summarize@v8.16.0
|
|
||||||
id: rp-summarize
|
|
||||||
with:
|
|
||||||
tests-outcome: ${{ steps.run-tests.outcome }}
|
|
||||||
rp-launch-key: ${{ steps.rp-prepare.outputs.key }}
|
|
||||||
rp-project: ${{ env.RP_PROJECT }}
|
|
||||||
rp-token: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
||||||
continue-on-error: true
|
|
||||||
- name: "Exit on failure"
|
|
||||||
if: steps.run-tests.outcome != 'success'
|
|
||||||
run: |
|
|
||||||
echo "::error title=run-tests::Tests failed: re-throwing on error."
|
|
||||||
exit 1
|
|
||||||
- name: "Configure AWS credentials"
|
- name: "Configure AWS credentials"
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
uses: aws-actions/configure-aws-credentials@v4
|
uses: aws-actions/configure-aws-credentials@v4
|
||||||
|
@@ -127,29 +127,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"results": {
|
"results": {
|
||||||
".github/workflows/ci.yml": [
|
|
||||||
{
|
|
||||||
"type": "Secret Keyword",
|
|
||||||
"filename": ".github/workflows/ci.yml",
|
|
||||||
"hashed_secret": "b86dc2f033a63f2b7b9e7d270ab806d2910d7572",
|
|
||||||
"is_verified": false,
|
|
||||||
"line_number": 295
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Secret Keyword",
|
|
||||||
"filename": ".github/workflows/ci.yml",
|
|
||||||
"hashed_secret": "1bfb0e20f886150ba59b853bcd49dea893e00966",
|
|
||||||
"is_verified": false,
|
|
||||||
"line_number": 370
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Secret Keyword",
|
|
||||||
"filename": ".github/workflows/ci.yml",
|
|
||||||
"hashed_secret": "128f14373ccfaff49e3664045d3a11b50cbb7b39",
|
|
||||||
"is_verified": false,
|
|
||||||
"line_number": 904
|
|
||||||
}
|
|
||||||
],
|
|
||||||
".github/workflows/master_release.yml": [
|
".github/workflows/master_release.yml": [
|
||||||
{
|
{
|
||||||
"type": "Secret Keyword",
|
"type": "Secret Keyword",
|
||||||
@@ -1273,7 +1250,7 @@
|
|||||||
"filename": "repository/src/main/resources/alfresco/repository.properties",
|
"filename": "repository/src/main/resources/alfresco/repository.properties",
|
||||||
"hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d",
|
"hashed_secret": "84551ae5442affc9f1a2d3b4c86ae8b24860149d",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 770,
|
"line_number": 771,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1519,7 +1496,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": 128,
|
"line_number": 130,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1607,7 +1584,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": 47,
|
"line_number": 48,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1868,5 +1845,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"generated_at": "2025-03-17T14:00:53Z"
|
"generated_at": "2025-06-09T16:43:14Z"
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -74,16 +74,6 @@
|
|||||||
<artifactId>alfresco-testng</artifactId>
|
<artifactId>alfresco-testng</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.awaitility</groupId>
|
<groupId>org.awaitility</groupId>
|
||||||
<artifactId>awaitility</artifactId>
|
<artifactId>awaitility</artifactId>
|
||||||
|
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rest.rm.community.model;
|
||||||
|
|
||||||
|
public record CapabilityModel(String name, String title, String description, GroupModel group, int index)
|
||||||
|
{}
|
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rest.rm.community.model;
|
||||||
|
|
||||||
|
public record GroupModel(String id, String title)
|
||||||
|
{}
|
@@ -0,0 +1,91 @@
|
|||||||
|
/*-
|
||||||
|
* #%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.rest.rm.community.model.role;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import org.alfresco.rest.rm.community.model.CapabilityModel;
|
||||||
|
import org.alfresco.utility.model.TestModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* POJO for role
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class Role extends TestModel
|
||||||
|
{
|
||||||
|
|
||||||
|
@JsonProperty(required = true)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@JsonProperty(required = true)
|
||||||
|
private List<CapabilityModel> capabilities;
|
||||||
|
|
||||||
|
@JsonProperty(required = true)
|
||||||
|
private String displayLabel;
|
||||||
|
|
||||||
|
@JsonProperty(required = true)
|
||||||
|
private String groupShortName;
|
||||||
|
|
||||||
|
private List<String> assignedUsers;
|
||||||
|
|
||||||
|
private List<String> assignedGroups;
|
||||||
|
|
||||||
|
private String roleGroupName;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o)
|
||||||
|
{
|
||||||
|
if (this == o)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Role role = (Role) o;
|
||||||
|
return Objects.equals(name, role.name) && Objects.equals(capabilities, role.capabilities)
|
||||||
|
&& Objects.equals(displayLabel, role.displayLabel) && Objects.equals(groupShortName, role.groupShortName) && Objects.equals(assignedUsers, role.assignedUsers)
|
||||||
|
&& Objects.equals(assignedGroups, role.assignedGroups) && Objects.equals(roleGroupName, role.roleGroupName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return Objects.hash(name, capabilities, displayLabel, groupShortName, assignedUsers, assignedGroups, roleGroupName);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,32 @@
|
|||||||
|
/*-
|
||||||
|
* #%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.rest.rm.community.model.role;
|
||||||
|
|
||||||
|
import org.alfresco.rest.core.RestModels;
|
||||||
|
|
||||||
|
public class RoleCollection extends RestModels<RoleEntry, RoleCollection>
|
||||||
|
{}
|
@@ -0,0 +1,47 @@
|
|||||||
|
/*-
|
||||||
|
* #%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.rest.rm.community.model.role;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import org.alfresco.rest.core.RestModels;
|
||||||
|
|
||||||
|
@Builder
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class RoleEntry extends RestModels<Role, RoleEntry>
|
||||||
|
{
|
||||||
|
@JsonProperty
|
||||||
|
private Role entry;
|
||||||
|
}
|
@@ -35,7 +35,7 @@ package org.alfresco.rest.rm.community.model.user;
|
|||||||
*/
|
*/
|
||||||
public enum UserRoles
|
public enum UserRoles
|
||||||
{
|
{
|
||||||
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User");
|
IN_PLACE_WRITERS("ExtendedWriters", "In-Place Writers"), ROLE_RM_ADMIN("Administrator", "Records Management Administrator"), ROLE_RM_MANAGER("RecordsManager", "Records Management Manager"), ROLE_RM_POWER_USER("PowerUser", "Records Management Power User"), ROLE_RM_SECURITY_OFFICER("SecurityOfficer", "Records Management Security Officer"), ROLE_RM_USER("User", "Records Management User"), IN_PLACE_READERS("ExtendedReaders", "In-Place Readers");
|
||||||
|
|
||||||
public final String roleId;
|
public final String roleId;
|
||||||
public final String displayName;
|
public final String displayName;
|
||||||
|
@@ -43,6 +43,7 @@ import org.alfresco.rest.rm.community.model.hold.Hold;
|
|||||||
import org.alfresco.rest.rm.community.model.hold.HoldCollection;
|
import org.alfresco.rest.rm.community.model.hold.HoldCollection;
|
||||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
||||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
|
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
|
||||||
|
import org.alfresco.rest.rm.community.model.role.RoleCollection;
|
||||||
import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
import org.alfresco.rest.rm.community.requests.RMModelRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -303,4 +304,39 @@ public class FilePlanAPI extends RMModelRequest
|
|||||||
{
|
{
|
||||||
return getHolds(filePlanId, EMPTY);
|
return getHolds(filePlanId, EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the roles of a file plan.
|
||||||
|
*
|
||||||
|
* @param filePlanId
|
||||||
|
* The identifier of a file plan
|
||||||
|
* @param parameters
|
||||||
|
* The URL parameters to add
|
||||||
|
* @return The {Pagination and RoleModel Entries} for the given {@code filePlanId}
|
||||||
|
* @throws RuntimeException
|
||||||
|
* for the following cases:
|
||||||
|
* <ul>
|
||||||
|
* <li>authentication fails</li>
|
||||||
|
* <li>current user does not have permission to read {@code filePlanId}</li>
|
||||||
|
* <li>{@code filePlanId} does not exist</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
public RoleCollection getFilePlanRoles(String filePlanId, String parameters)
|
||||||
|
{
|
||||||
|
mandatoryString("filePlanId", filePlanId);
|
||||||
|
return getRmRestWrapper().processModels(RoleCollection.class, simpleRequest(
|
||||||
|
GET,
|
||||||
|
"file-plans/{filePlanId}/roles?{parameters}",
|
||||||
|
filePlanId,
|
||||||
|
parameters));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See {@link #getFilePlanRoles(String, String)}
|
||||||
|
*/
|
||||||
|
public RoleCollection getFilePlanRoles(String filePlanId)
|
||||||
|
{
|
||||||
|
return getFilePlanRoles(filePlanId, EMPTY);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -93,6 +93,7 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
|
|||||||
import org.alfresco.rest.search.RestRequestQueryModel;
|
import org.alfresco.rest.search.RestRequestQueryModel;
|
||||||
import org.alfresco.rest.search.SearchNodeModel;
|
import org.alfresco.rest.search.SearchNodeModel;
|
||||||
import org.alfresco.rest.search.SearchRequest;
|
import org.alfresco.rest.search.SearchRequest;
|
||||||
|
import org.alfresco.rest.v0.RMRolesAndActionsAPI;
|
||||||
import org.alfresco.rest.v0.SearchAPI;
|
import org.alfresco.rest.v0.SearchAPI;
|
||||||
import org.alfresco.utility.Utility;
|
import org.alfresco.utility.Utility;
|
||||||
import org.alfresco.utility.data.DataUserAIS;
|
import org.alfresco.utility.data.DataUserAIS;
|
||||||
@@ -127,6 +128,10 @@ public class BaseRMRestTest extends RestTest
|
|||||||
@Getter(value = PROTECTED)
|
@Getter(value = PROTECTED)
|
||||||
private SearchAPI searchApi;
|
private SearchAPI searchApi;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Getter(PROTECTED)
|
||||||
|
private RMRolesAndActionsAPI rmRolesAndActionsV0API;
|
||||||
|
|
||||||
protected static final String iso8601_DateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
|
protected static final String iso8601_DateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -28,6 +28,7 @@ package org.alfresco.rest.rm.community.fileplans;
|
|||||||
|
|
||||||
import static java.util.Arrays.asList;
|
import static java.util.Arrays.asList;
|
||||||
|
|
||||||
|
import static com.google.common.collect.Sets.newHashSet;
|
||||||
import static org.springframework.http.HttpStatus.CONFLICT;
|
import static org.springframework.http.HttpStatus.CONFLICT;
|
||||||
import static org.springframework.http.HttpStatus.CREATED;
|
import static org.springframework.http.HttpStatus.CREATED;
|
||||||
import static org.springframework.http.HttpStatus.FORBIDDEN;
|
import static org.springframework.http.HttpStatus.FORBIDDEN;
|
||||||
@@ -56,19 +57,27 @@ import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanCo
|
|||||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_CONTAINER_TYPE;
|
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_CONTAINER_TYPE;
|
||||||
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
|
import static org.alfresco.rest.rm.community.model.fileplancomponents.FilePlanComponentType.UNFILED_RECORD_FOLDER_TYPE;
|
||||||
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
|
import static org.alfresco.rest.rm.community.model.user.UserPermissions.PERMISSION_FILING;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.IN_PLACE_READERS;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.IN_PLACE_WRITERS;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_ADMIN;
|
||||||
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER;
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_MANAGER;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_POWER_USER;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_SECURITY_OFFICER;
|
||||||
|
import static org.alfresco.rest.rm.community.model.user.UserRoles.ROLE_RM_USER;
|
||||||
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
|
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
|
||||||
import static org.alfresco.utility.data.RandomData.getRandomName;
|
import static org.alfresco.utility.data.RandomData.getRandomName;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.testng.annotations.DataProvider;
|
import org.testng.annotations.DataProvider;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
import org.alfresco.rest.rm.community.base.BaseRMRestTest;
|
||||||
import org.alfresco.rest.rm.community.base.DataProviderClass;
|
import org.alfresco.rest.rm.community.base.DataProviderClass;
|
||||||
|
import org.alfresco.rest.rm.community.model.CapabilityModel;
|
||||||
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
|
import org.alfresco.rest.rm.community.model.fileplan.FilePlan;
|
||||||
import org.alfresco.rest.rm.community.model.fileplan.FilePlanProperties;
|
import org.alfresco.rest.rm.community.model.fileplan.FilePlanProperties;
|
||||||
import org.alfresco.rest.rm.community.model.hold.Hold;
|
import org.alfresco.rest.rm.community.model.hold.Hold;
|
||||||
@@ -76,6 +85,9 @@ import org.alfresco.rest.rm.community.model.hold.HoldCollection;
|
|||||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory;
|
||||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
|
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryCollection;
|
||||||
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryProperties;
|
import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryProperties;
|
||||||
|
import org.alfresco.rest.rm.community.model.role.Role;
|
||||||
|
import org.alfresco.rest.rm.community.model.role.RoleCollection;
|
||||||
|
import org.alfresco.rest.rm.community.model.user.UserCapabilities;
|
||||||
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
|
import org.alfresco.rest.rm.community.requests.gscore.api.RMSiteAPI;
|
||||||
import org.alfresco.utility.constants.ContainerName;
|
import org.alfresco.utility.constants.ContainerName;
|
||||||
import org.alfresco.utility.model.UserModel;
|
import org.alfresco.utility.model.UserModel;
|
||||||
@@ -87,6 +99,7 @@ import org.alfresco.utility.report.Bug;
|
|||||||
* @author Rodica Sutu
|
* @author Rodica Sutu
|
||||||
* @since 2.6
|
* @since 2.6
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("PMD.UnitTestShouldIncludeAssert")
|
||||||
public class FilePlanTests extends BaseRMRestTest
|
public class FilePlanTests extends BaseRMRestTest
|
||||||
{
|
{
|
||||||
// ** Number of children (for children creation test) */
|
// ** Number of children (for children creation test) */
|
||||||
@@ -266,7 +279,7 @@ public class FilePlanTests extends BaseRMRestTest
|
|||||||
* When I ask the API to create a root record category
|
* When I ask the API to create a root record category
|
||||||
* Then it is created as a root record category
|
* Then it is created as a root record category
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* Given that a file plan exists
|
* Given that a file plan exists
|
||||||
* When I use the API to create a folder (cm:folder type) into the fileplan
|
* When I use the API to create a folder (cm:folder type) into the fileplan
|
||||||
@@ -314,7 +327,7 @@ public class FilePlanTests extends BaseRMRestTest
|
|||||||
* When I ask the API to create a root category having the same name
|
* When I ask the API to create a root category having the same name
|
||||||
* Then the response code received is 409 - name clashes with an existing node
|
* Then the response code received is 409 - name clashes with an existing node
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* Given a root category
|
* Given a root category
|
||||||
* When I ask the API to create a root category having the same name with autoRename parameter on true
|
* When I ask the API to create a root category having the same name with autoRename parameter on true
|
||||||
@@ -594,4 +607,171 @@ public class FilePlanTests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When rmAdmin user ask the API for roles
|
||||||
|
* It provides list of all default roles
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void listFilePlanAllDefaultRoles()
|
||||||
|
{
|
||||||
|
List<String> defaultRolesDisplayNames = asList(IN_PLACE_READERS.displayName, ROLE_RM_ADMIN.displayName, ROLE_RM_MANAGER.displayName, ROLE_RM_POWER_USER.displayName, ROLE_RM_USER.displayName, IN_PLACE_WRITERS.displayName, ROLE_RM_SECURITY_OFFICER.displayName);
|
||||||
|
// Call to new API to get the roles and capabilities
|
||||||
|
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS);
|
||||||
|
assertStatusCode(OK);
|
||||||
|
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||||
|
Role role = roleModelEntry.getEntry();
|
||||||
|
assertTrue(defaultRolesDisplayNames.contains(role.getDisplayLabel()));
|
||||||
|
assertNotNull(role.getCapabilities());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When rmAdmin user ask the API for roles with SystemRoles as false
|
||||||
|
* It provides list of all roles excluding SystemRoles
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void listFilePlanAllRolesExcludeSystemRoles()
|
||||||
|
{
|
||||||
|
String parameters = "where=(systemRoles=false)";
|
||||||
|
List<String> systemRolesDisplayNames = asList(IN_PLACE_WRITERS.displayName, IN_PLACE_READERS.displayName);
|
||||||
|
// Call to new API to get the roles and capabilities
|
||||||
|
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||||
|
assertStatusCode(OK);
|
||||||
|
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||||
|
Role role = roleModelEntry.getEntry();
|
||||||
|
assertFalse(systemRolesDisplayNames.contains(role.getDisplayLabel()));
|
||||||
|
assertNotNull(role.getCapabilities());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When a non-RM user asks the API for the roles
|
||||||
|
* Then the status code 403 (Permission denied) is return
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void nonRmUserFilePlanRoles()
|
||||||
|
{
|
||||||
|
// Create a random user
|
||||||
|
UserModel nonRMuser = getDataUser().createRandomTestUser("testUser");
|
||||||
|
// Call to new API to get the roles and capabilities
|
||||||
|
getRestAPIFactory().getFilePlansAPI(nonRMuser).getFilePlanRoles(FILE_PLAN_ALIAS);
|
||||||
|
assertStatusCode(FORBIDDEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When a RM_Manager user asks the API for the roles
|
||||||
|
* returns the RM_Manager role and capabilities
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void rmManagerFilePlanRolesAndCapabilities()
|
||||||
|
{
|
||||||
|
// Create a random user
|
||||||
|
UserModel managerUser = getDataUser().createRandomTestUser("managerUser");
|
||||||
|
// Assign RecordsManager role to user
|
||||||
|
getRestAPIFactory().getRMUserAPI().assignRoleToUser(managerUser.getUsername(), ROLE_RM_MANAGER.roleId);
|
||||||
|
String parameters = "where=(personId='" + managerUser.getUsername() + "')";
|
||||||
|
// Call to new API to get the roles and capabilities
|
||||||
|
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(managerUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||||
|
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||||
|
Role role = roleModelEntry.getEntry();
|
||||||
|
assertEquals(ROLE_RM_MANAGER.displayName, role.getDisplayLabel());
|
||||||
|
assertNotNull(role.getCapabilities());
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When a User with more than one role asks the API for the roles and relation
|
||||||
|
* returns the roles and capabilities
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void multipleRoleUserFilePlanRolesAndCapabilities()
|
||||||
|
{
|
||||||
|
// Create a random user
|
||||||
|
UserModel rmUser = getDataUser().createRandomTestUser("rmUser");
|
||||||
|
// Assign rmUser role to user
|
||||||
|
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_USER.roleId);
|
||||||
|
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmUser.getUsername(), ROLE_RM_POWER_USER.roleId);
|
||||||
|
String parameters = "where=(personId='" + rmUser.getUsername() + "')";
|
||||||
|
// Call to new API to get the roles and capabilities
|
||||||
|
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(rmUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||||
|
assertStatusCode(OK);
|
||||||
|
assertEquals(roleCollection.getEntries().size(), 2);
|
||||||
|
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||||
|
Role role = roleModelEntry.getEntry();
|
||||||
|
assertTrue(role.getDisplayLabel().equals(ROLE_RM_USER.displayName) || role.getDisplayLabel().equals(ROLE_RM_POWER_USER.displayName));
|
||||||
|
assertNotNull(role.getCapabilities());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When a new user with a new role asks the API for the roles and relation
|
||||||
|
* returns the new role and new capabilities
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void newRoleUserFilePlanRolesAndCapabilities()
|
||||||
|
{
|
||||||
|
/** A list of capabilities. */
|
||||||
|
Set<String> newCapabilities = newHashSet(UserCapabilities.VIEW_RECORDS_CAP, UserCapabilities.DECLARE_RECORDS_CAP);
|
||||||
|
// Create a new role using old API
|
||||||
|
getRmRolesAndActionsV0API().createRole(getAdminUser().getUsername(), getAdminUser().getPassword(), "NewTestRole",
|
||||||
|
"New Role Label", newCapabilities);
|
||||||
|
// Create a random user
|
||||||
|
UserModel rmNewUser = getDataUser().createRandomTestUser("rmPowerUser");
|
||||||
|
// Assign New role to user
|
||||||
|
getRestAPIFactory().getRMUserAPI().assignRoleToUser(rmNewUser.getUsername(), "NewTestRole");
|
||||||
|
String parameters = "where=(personId='" + rmNewUser.getUsername() + "')";
|
||||||
|
// Call to new API to get the roles and capabilities
|
||||||
|
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI(rmNewUser).getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||||
|
assertStatusCode(OK);
|
||||||
|
assertEquals(roleCollection.getEntries().size(), 1);
|
||||||
|
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||||
|
List<CapabilityModel> capabilities = roleModelEntry.getEntry().getCapabilities();
|
||||||
|
capabilities.forEach(capabilityModel -> {
|
||||||
|
assertTrue(newCapabilities.contains(capabilityModel.name()));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* Given that a file plan exists
|
||||||
|
* When API call happens with Capability filter
|
||||||
|
* returns roles associated with the capability
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void filePlanRolesAndCapabilitiesFilter()
|
||||||
|
{
|
||||||
|
String parameters = "where=(systemRoles=true and capabilityName in ('ManageRules'))";
|
||||||
|
// Call to new API to get the roles and capabilities, filter by capability, include assigned users
|
||||||
|
RoleCollection roleCollection = getRestAPIFactory().getFilePlansAPI().getFilePlanRoles(FILE_PLAN_ALIAS, parameters);
|
||||||
|
assertStatusCode(OK);
|
||||||
|
assertEquals(roleCollection.getEntries().size(), 1);
|
||||||
|
roleCollection.getEntries().forEach(roleModelEntry -> {
|
||||||
|
Role role = roleModelEntry.getEntry();
|
||||||
|
assertEquals(ROLE_RM_ADMIN.displayName, role.getDisplayLabel());
|
||||||
|
assertNotNull(role.getCapabilities());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -134,6 +134,16 @@ 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();
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -23,7 +23,7 @@ Recorded content can be explicitly destroyed whilst maintaining the original nod
|
|||||||
* License: Alfresco Community
|
* License: Alfresco Community
|
||||||
* Issue Tracker Link: [JIRA RM](https://issues.alfresco.com/jira/projects/RM/summary)
|
* Issue Tracker Link: [JIRA RM](https://issues.alfresco.com/jira/projects/RM/summary)
|
||||||
* Contribution Model: Alfresco Closed Source
|
* Contribution Model: Alfresco Closed Source
|
||||||
* Documentation: [docs.alfresco.com (Records Management)](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition/Introduction)
|
* Documentation: [docs.alfresco.com (Records Management)](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1&component=Alfresco%20Governance%20Services%20Community%20Edition)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
@@ -21,18 +21,18 @@ RM is split into two main parts - a repository integration and a Share integrati
|
|||||||
* [Community License](../LICENSE.txt)
|
* [Community License](../LICENSE.txt)
|
||||||
* [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository)
|
* [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository)
|
||||||
* [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM)
|
* [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM)
|
||||||
* [Community Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services-Community-Edition/23.4/Alfresco-Governance-Services-Community-Edition/Introduction)
|
* [Community Documentation Link](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1&component=Alfresco%20Governance%20Services%20Community%20Edition)
|
||||||
* [Enterprise Documentation Link](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services/23.4/Alfresco-Governance-Services/Introduction)
|
* [Enterprise Documentation Link](https://support.hyland.com/access?dita:id=job1721300866386&vrm_version=25.1)
|
||||||
* [Contribution Model](../../CONTRIBUTING.md)
|
* [Contribution Model](../../CONTRIBUTING.md)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
### Prerequisite Knowledge
|
### Prerequisite Knowledge
|
||||||
An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services-Community-Edition/23.4/Alfresco-Content-Services-Community-Edition/Develop) give useful background information:
|
An understanding of Alfresco Content Services is assumed. The following pages from the [developer documentation](https://support.hyland.com/access?dita:id=lsl1724405261585&vrm_version=25.2&component=Alfresco%20Content%20Services%20Community%20Edition) give useful background information:
|
||||||
|
|
||||||
* [ACS Architecture](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Software-Architecture)
|
* [ACS Architecture](https://support.hyland.com/access?dita:id=lfo1719554691023&vrm_version=25.2)
|
||||||
* [Platform Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Extension-Points-Overview)
|
* [Platform Extensions](https://support.hyland.com/access?dita:id=ifr1720080387005&vrm_version=25.2)
|
||||||
* [Share Extensions](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Share-UI-Extension-Points)
|
* [Share Extensions](https://support.hyland.com/access?dita:id=wqu1720687386891&vrm_version=25.2)
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
@@ -44,12 +44,12 @@ The RM Share module communicates with the repository module via REST APIs. Inter
|
|||||||
* A DAO layer responsible for CRUD operations against the database.
|
* A DAO layer responsible for CRUD operations against the database.
|
||||||
|
|
||||||
#### REST API
|
#### REST API
|
||||||
The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Web-Scripts) is older and not recommended for integrations. The [v1 API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/REST-API-Guide) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
|
The REST API endpoints fall into two main types - v0 (Webscripts) and v1. The [v0 API](https://support.hyland.com/access?dita:id=fga1720080409048&vrm_version=25.2) is older and not recommended for integrations. The [v1 API](https://support.hyland.com/access?dita:id=cmm1721136574006&vrm_version=25.2) is newer but isn't yet feature complete. If you are running RM locally then the GS API Explorer will be available at [this link](http://localhost:8080/gs-api-explorer/).
|
||||||
|
|
||||||
Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming.
|
Internally the GS v1 REST API is built on the [Alfresco v1 REST API framework](https://community.alfresco.com/community/ecm/blog/2016/10/11/v1-rest-api-part-1-introduction). It aims to be consistent with this in terms of behaviour and naming.
|
||||||
|
|
||||||
#### Java Public API
|
#### Java Public API
|
||||||
The Java service layer is fronted by a [Java Public API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Reference/Java-Foundation-API), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
|
The Java service layer is fronted by a [Java Public API](https://support.hyland.com/access?dita:id=lol1721390191517&vrm_version=25.2), which we will ensure backward compatible with previous releases. Before we remove any methods there will first be a release containing that method deprecated to allow third party integrations to migrate to a new method. The Java Public API also includes a set of POJO objects which are needed to communicate with the services. It is easy to identify classes that are part of the Java Public API as they are annotated `@AlfrescoPublicApi`.
|
||||||
|
|
||||||
Each Java service will have at least four beans defined for it:
|
Each Java service will have at least four beans defined for it:
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ Each Java service will have at least four beans defined for it:
|
|||||||
#### DAOs
|
#### DAOs
|
||||||
The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations.
|
The DAOs are not part of the Java Public API, but handle CRUD operations against RM stored data. We have some custom queries to improve performance for particularly heavy operations.
|
||||||
|
|
||||||
We use standard Alfresco [data modelling](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Content-Model-Extension-Point) to store RM metadata. We extend the [Alfresco patching mechanism](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Patches) to provide community and enterprise schema upgrades.
|
We use standard Alfresco [data modelling](https://support.hyland.com/access?dita:id=ekx1720080373621&vrm_version=25.2) to store RM metadata. We extend the [Alfresco patching mechanism](https://support.hyland.com/access?dita:id=ato1720080396825&vrm_version=25.2) to provide community and enterprise schema upgrades.
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
SOLR6_TAG=2.0.15
|
SOLR6_TAG=2.0.16
|
||||||
POSTGRES_TAG=16.6
|
POSTGRES_TAG=16.6
|
||||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||||
|
@@ -33,5 +33,8 @@
|
|||||||
|
|
||||||
<!-- 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>
|
||||||
|
@@ -78,6 +78,12 @@
|
|||||||
<property name="transactionService" ref="transactionService" />
|
<property name="transactionService" ref="transactionService" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean class="org.alfresco.rm.rest.api.fileplans.FilePlanRolesRelation">
|
||||||
|
<property name="apiUtils" ref="apiUtils" />
|
||||||
|
<property name="rmRoles" ref="rm.roles" />
|
||||||
|
<property name="filePlanService" ref="FilePlanService" />
|
||||||
|
</bean>
|
||||||
|
|
||||||
<bean class="org.alfresco.rm.rest.api.holds.HoldsEntityResource" >
|
<bean class="org.alfresco.rm.rest.api.holds.HoldsEntityResource" >
|
||||||
<property name="holdService" ref="HoldService" />
|
<property name="holdService" ref="HoldService" />
|
||||||
<property name="apiUtils" ref="apiUtils" />
|
<property name="apiUtils" ref="apiUtils" />
|
||||||
@@ -228,6 +234,11 @@
|
|||||||
<property name="siteSurfConfig" ref="rm.siteSurfConfig" />
|
<property name="siteSurfConfig" ref="rm.siteSurfConfig" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="rm.roles" class="org.alfresco.rm.rest.api.impl.RMRolesImpl">
|
||||||
|
<property name="nodesModelFactory" ref="nodesModelFactory" />
|
||||||
|
<property name="filePlanRoleService" ref="FilePlanRoleService"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
<bean id="rm.siteSurfConfig" class="org.alfresco.rest.api.impl.SiteSurfConfig">
|
<bean id="rm.siteSurfConfig" class="org.alfresco.rest.api.impl.SiteSurfConfig">
|
||||||
<property name="configPath" value="alfresco/module/org_alfresco_module_rm/bootstrap/site"/>
|
<property name="configPath" value="alfresco/module/org_alfresco_module_rm/bootstrap/site"/>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -280,4 +291,4 @@
|
|||||||
<property name="beanName" value="restJsonModule" />
|
<property name="beanName" value="restJsonModule" />
|
||||||
<property name="extendingBeanName" value="rm.restJsonModule" />
|
<property name="extendingBeanName" value="rm.restJsonModule" />
|
||||||
</bean>
|
</bean>
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -84,11 +84,6 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
|
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* #%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 java.io.File;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DoD 5220-22M Seven Pass data cleansing implementation.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ContentCleanserSevenPass extends ContentCleanser522022M
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.module.org_alfresco_module_rm.content.cleanser.ContentCleanser#cleanse(java.io.File)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void cleanse(File file)
|
||||||
|
{
|
||||||
|
super.cleanse(file);
|
||||||
|
overwrite(file, overwriteZeros);
|
||||||
|
overwrite(file, overwriteZeros);
|
||||||
|
overwrite(file, overwriteOnes);
|
||||||
|
overwrite(file, overwriteRandom);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api;
|
||||||
|
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
|
import org.alfresco.rm.rest.api.model.RoleModel;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RM Roles API
|
||||||
|
*/
|
||||||
|
public interface RMRoles
|
||||||
|
{
|
||||||
|
|
||||||
|
String PARAM_INCLUDE_ASSIGNED_USERS = "assignedUsers";
|
||||||
|
String PARAM_INCLUDE_ASSIGNED_GROUPS = "assignedGroups";
|
||||||
|
String PARAM_INCLUDE_SYSTEM_ROLES = "systemRoles";
|
||||||
|
String PARAM_CAPABILITY_NAME = "capabilityName";
|
||||||
|
String PARAM_PERSON_ID = "personId";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a list of roles.
|
||||||
|
*
|
||||||
|
* @param filePlan
|
||||||
|
* the file plan node reference
|
||||||
|
* @param parameters
|
||||||
|
* the {@link Parameters} object to get the parameters passed into the request including: - filter, sort & paging params (where, orderBy, skipCount, maxItems) - include param (personId, includeSystemRoles)
|
||||||
|
* @return a paged list of {@code org.alfresco.rm.rest.api.model.RoleModel} objects
|
||||||
|
*/
|
||||||
|
CollectionWithPagingInfo<RoleModel> getRoles(NodeRef filePlan, Parameters parameters);
|
||||||
|
}
|
@@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.fileplans;
|
||||||
|
|
||||||
|
import static org.alfresco.util.ParameterCheck.mandatory;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
|
import org.alfresco.rest.framework.core.exceptions.EntityNotFoundException;
|
||||||
|
import org.alfresco.rest.framework.resource.RelationshipResource;
|
||||||
|
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceAction;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
|
import org.alfresco.rm.rest.api.RMRoles;
|
||||||
|
import org.alfresco.rm.rest.api.impl.FilePlanComponentsApiUtils;
|
||||||
|
import org.alfresco.rm.rest.api.model.RoleModel;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
@RelationshipResource(name = "roles", entityResource = FilePlanEntityResource.class, title = "Roles in a file plan")
|
||||||
|
public class FilePlanRolesRelation implements RelationshipResourceAction.Read<RoleModel>, InitializingBean
|
||||||
|
{
|
||||||
|
private RMRoles rmRoles;
|
||||||
|
private FilePlanService filePlanService;
|
||||||
|
private FilePlanComponentsApiUtils apiUtils;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterPropertiesSet() throws Exception
|
||||||
|
{
|
||||||
|
mandatory("rmRoles", this.rmRoles);
|
||||||
|
mandatory("apiUtils", this.apiUtils);
|
||||||
|
mandatory("filePlanService", this.filePlanService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CollectionWithPagingInfo<RoleModel> readAll(String filePlanId, Parameters params)
|
||||||
|
{
|
||||||
|
NodeRef filePlanNodeRef = getFilePlan(filePlanId);
|
||||||
|
if (filePlanNodeRef == null)
|
||||||
|
{
|
||||||
|
throw new EntityNotFoundException(filePlanId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rmRoles.getRoles(filePlanNodeRef, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
private NodeRef getFilePlan(String filePlanId)
|
||||||
|
{
|
||||||
|
NodeRef filePlanNodeRef = apiUtils.lookupAndValidateNodeType(filePlanId, RecordsManagementModel.TYPE_FILE_PLAN);
|
||||||
|
if (!FilePlanComponentsApiUtils.FILE_PLAN_ALIAS.equals(filePlanId))
|
||||||
|
{
|
||||||
|
filePlanNodeRef = filePlanService.getFilePlan(filePlanNodeRef);
|
||||||
|
}
|
||||||
|
return filePlanNodeRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRmRoles(RMRoles rmRoles)
|
||||||
|
{
|
||||||
|
this.rmRoles = rmRoles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiUtils(FilePlanComponentsApiUtils apiUtils)
|
||||||
|
{
|
||||||
|
this.apiUtils = apiUtils;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilePlanService(FilePlanService filePlanService)
|
||||||
|
{
|
||||||
|
this.filePlanService = filePlanService;
|
||||||
|
}
|
||||||
|
}
|
@@ -30,6 +30,7 @@ package org.alfresco.rm.rest.api.impl;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -42,12 +43,15 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistry;
|
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistry;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.capability.Group;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinitionImpl;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinitionImpl;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
|
import org.alfresco.module.org_alfresco_module_rm.event.RecordsManagementEvent;
|
||||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||||
import org.alfresco.rest.api.Nodes;
|
import org.alfresco.rest.api.Nodes;
|
||||||
import org.alfresco.rest.api.model.AssocChild;
|
import org.alfresco.rest.api.model.AssocChild;
|
||||||
import org.alfresco.rest.api.model.ContentInfo;
|
import org.alfresco.rest.api.model.ContentInfo;
|
||||||
@@ -55,7 +59,9 @@ import org.alfresco.rest.api.model.Node;
|
|||||||
import org.alfresco.rest.api.model.UserInfo;
|
import org.alfresco.rest.api.model.UserInfo;
|
||||||
import org.alfresco.rest.framework.jacksonextensions.BeanPropertiesFilter;
|
import org.alfresco.rest.framework.jacksonextensions.BeanPropertiesFilter;
|
||||||
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
|
import org.alfresco.rm.rest.api.model.CapabilityModel;
|
||||||
import org.alfresco.rm.rest.api.model.FilePlan;
|
import org.alfresco.rm.rest.api.model.FilePlan;
|
||||||
|
import org.alfresco.rm.rest.api.model.GroupModel;
|
||||||
import org.alfresco.rm.rest.api.model.HoldModel;
|
import org.alfresco.rm.rest.api.model.HoldModel;
|
||||||
import org.alfresco.rm.rest.api.model.RMNode;
|
import org.alfresco.rm.rest.api.model.RMNode;
|
||||||
import org.alfresco.rm.rest.api.model.Record;
|
import org.alfresco.rm.rest.api.model.Record;
|
||||||
@@ -66,6 +72,7 @@ import org.alfresco.rm.rest.api.model.RetentionPeriod;
|
|||||||
import org.alfresco.rm.rest.api.model.RetentionSchedule;
|
import org.alfresco.rm.rest.api.model.RetentionSchedule;
|
||||||
import org.alfresco.rm.rest.api.model.RetentionScheduleActionDefinition;
|
import org.alfresco.rm.rest.api.model.RetentionScheduleActionDefinition;
|
||||||
import org.alfresco.rm.rest.api.model.RetentionSteps;
|
import org.alfresco.rm.rest.api.model.RetentionSteps;
|
||||||
|
import org.alfresco.rm.rest.api.model.RoleModel;
|
||||||
import org.alfresco.rm.rest.api.model.Transfer;
|
import org.alfresco.rm.rest.api.model.Transfer;
|
||||||
import org.alfresco.rm.rest.api.model.TransferChild;
|
import org.alfresco.rm.rest.api.model.TransferChild;
|
||||||
import org.alfresco.rm.rest.api.model.TransferContainer;
|
import org.alfresco.rm.rest.api.model.TransferContainer;
|
||||||
@@ -696,6 +703,36 @@ public class ApiNodesModelFactory
|
|||||||
(String) info.getProperties().get(RecordsManagementModel.PROP_HOLD_REASON));
|
(String) info.getProperties().get(RecordsManagementModel.PROP_HOLD_REASON));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RoleModel createRoleModel(Role role, List<String> assignedUsers, List<String> assignedGroups)
|
||||||
|
{
|
||||||
|
return new RoleModel(role.getName(),
|
||||||
|
role.getDisplayLabel(),
|
||||||
|
role.getCapabilities()
|
||||||
|
.stream()
|
||||||
|
.map(this::createCapabilityModel)
|
||||||
|
.sorted(Comparator.comparing(CapabilityModel::name))
|
||||||
|
.toList(),
|
||||||
|
role.getRoleGroupName(),
|
||||||
|
role.getGroupShortName(),
|
||||||
|
assignedUsers,
|
||||||
|
assignedGroups);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CapabilityModel createCapabilityModel(Capability capability)
|
||||||
|
{
|
||||||
|
return new CapabilityModel(capability.getName(), capability.getTitle(), capability.getDescription(),
|
||||||
|
createGroupModel(capability.getGroup()), capability.getIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
public GroupModel createGroupModel(Group group)
|
||||||
|
{
|
||||||
|
if (group == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new GroupModel(group.getId(), group.getTitle());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an object of type FilePlan
|
* Creates an object of type FilePlan
|
||||||
*
|
*
|
||||||
|
@@ -0,0 +1,264 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||||
|
import org.alfresco.rest.antlr.WhereClauseParser;
|
||||||
|
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.where.Query;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.where.QueryHelper;
|
||||||
|
import org.alfresco.rest.workflow.api.impl.MapBasedQueryWalker;
|
||||||
|
import org.alfresco.rm.rest.api.RMRoles;
|
||||||
|
import org.alfresco.rm.rest.api.model.RoleModel;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
public class RMRolesImpl implements RMRoles
|
||||||
|
{
|
||||||
|
private ApiNodesModelFactory nodesModelFactory;
|
||||||
|
private FilePlanRoleService filePlanRoleService;
|
||||||
|
|
||||||
|
private static final Set<String> LIST_ROLES_QUERY_PROPERTIES = new HashSet<>(List.of(PARAM_PERSON_ID, PARAM_INCLUDE_SYSTEM_ROLES, PARAM_CAPABILITY_NAME));
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CollectionWithPagingInfo<RoleModel> getRoles(NodeRef filePlan, Parameters parameters)
|
||||||
|
{
|
||||||
|
var rolesFilter = getRolesFilter(parameters.getQuery());
|
||||||
|
var roles = getRolesByFilter(filePlan, rolesFilter);
|
||||||
|
|
||||||
|
var filteredRoles = roles.stream()
|
||||||
|
.map(role -> createRoleModel(filePlan, role, parameters.getInclude()))
|
||||||
|
.filter(hasRoleCapabilities(rolesFilter.getCapabilities()))
|
||||||
|
.toList();
|
||||||
|
var page = filteredRoles
|
||||||
|
.stream()
|
||||||
|
.sorted(Comparator.comparing(RoleModel::name))
|
||||||
|
.skip(parameters.getPaging().getSkipCount())
|
||||||
|
.limit(parameters.getPaging().getMaxItems())
|
||||||
|
.collect(Collectors.toCollection(LinkedList::new));
|
||||||
|
|
||||||
|
int totalItems = filteredRoles.size();
|
||||||
|
boolean hasMore = parameters.getPaging().getSkipCount() + parameters.getPaging().getMaxItems() < totalItems;
|
||||||
|
return CollectionWithPagingInfo.asPaged(parameters.getPaging(), page, hasMore, totalItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Predicate<RoleModel> hasRoleCapabilities(List<String> capabilities)
|
||||||
|
{
|
||||||
|
return role -> capabilities == null ||
|
||||||
|
capabilities.isEmpty() ||
|
||||||
|
role.capabilities().stream().anyMatch(capability -> capabilities.contains(capability.name()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Set<Role> getRolesByFilter(NodeRef filePlan, RolesFilter rolesFilter)
|
||||||
|
{
|
||||||
|
if (rolesFilter.getPersonId() != null)
|
||||||
|
{
|
||||||
|
return filePlanRoleService.getRolesByUser(filePlan, rolesFilter.getPersonId(), rolesFilter.includeSystemRoles());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return filePlanRoleService.getRoles(filePlan, rolesFilter.includeSystemRoles());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoleModel createRoleModel(NodeRef filePlan, Role role, List<String> include)
|
||||||
|
{
|
||||||
|
List<String> assignedUsers = getAssignedUsers(filePlan, role, include);
|
||||||
|
List<String> assignedGroups = getAssignedGroups(filePlan, role, include);
|
||||||
|
|
||||||
|
return nodesModelFactory.createRoleModel(role, assignedUsers, assignedGroups);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getAssignedUsers(NodeRef filePlan, Role role, List<String> include)
|
||||||
|
{
|
||||||
|
if (include != null && include.contains(PARAM_INCLUDE_ASSIGNED_USERS))
|
||||||
|
{
|
||||||
|
return new ArrayList<>(filePlanRoleService.getAllAssignedToRole(filePlan, role.getName()));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getAssignedGroups(NodeRef filePlan, Role role, List<String> include)
|
||||||
|
{
|
||||||
|
if (include != null && include.contains(PARAM_INCLUDE_ASSIGNED_GROUPS))
|
||||||
|
{
|
||||||
|
return new ArrayList<>(filePlanRoleService.getGroupsAssignedToRole(filePlan, role.getName()));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodesModelFactory(ApiNodesModelFactory nodesModelFactory)
|
||||||
|
{
|
||||||
|
this.nodesModelFactory = nodesModelFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
|
||||||
|
{
|
||||||
|
this.filePlanRoleService = filePlanRoleService;
|
||||||
|
}
|
||||||
|
|
||||||
|
private RolesFilter getRolesFilter(Query queryParameters)
|
||||||
|
{
|
||||||
|
var rolesFilterBuilder = RolesFilter.builder();
|
||||||
|
|
||||||
|
if (queryParameters != null)
|
||||||
|
{
|
||||||
|
var propertyWalker = new RolesQueryWalker();
|
||||||
|
QueryHelper.walk(queryParameters, propertyWalker);
|
||||||
|
|
||||||
|
rolesFilterBuilder
|
||||||
|
.withPersonId(propertyWalker.getPersonId())
|
||||||
|
.withCapabilities(propertyWalker.getCapabilitiesNames())
|
||||||
|
.withIncludeSystemRoles(propertyWalker.includeSystemRoles());
|
||||||
|
}
|
||||||
|
return rolesFilterBuilder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class RolesQueryWalker extends MapBasedQueryWalker
|
||||||
|
{
|
||||||
|
private List<String> capabilitiesNames;
|
||||||
|
|
||||||
|
public RolesQueryWalker()
|
||||||
|
{
|
||||||
|
super(LIST_ROLES_QUERY_PROPERTIES, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void in(String propertyName, boolean negated, String... propertyValues)
|
||||||
|
{
|
||||||
|
if (negated)
|
||||||
|
{
|
||||||
|
throw new InvalidArgumentException("Cannot use NOT for " + propertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PARAM_CAPABILITY_NAME.equalsIgnoreCase(propertyName))
|
||||||
|
{
|
||||||
|
capabilitiesNames = Arrays.asList(propertyValues);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void and()
|
||||||
|
{
|
||||||
|
// allow AND, e.g. personId='123' AND includeSystemRoles=true
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getCapabilitiesNames()
|
||||||
|
{
|
||||||
|
return this.capabilitiesNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersonId()
|
||||||
|
{
|
||||||
|
return getProperty(PARAM_PERSON_ID, WhereClauseParser.EQUALS, String.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean includeSystemRoles()
|
||||||
|
{
|
||||||
|
return getProperty(PARAM_INCLUDE_SYSTEM_ROLES, WhereClauseParser.EQUALS, Boolean.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RolesFilter
|
||||||
|
{
|
||||||
|
private String personId;
|
||||||
|
private boolean includeSystemRoles;
|
||||||
|
private List<String> capabilities;
|
||||||
|
|
||||||
|
private RolesFilter()
|
||||||
|
{}
|
||||||
|
|
||||||
|
public static RolesFilterBuilder builder()
|
||||||
|
{
|
||||||
|
return new RolesFilterBuilder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersonId()
|
||||||
|
{
|
||||||
|
return personId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean includeSystemRoles()
|
||||||
|
{
|
||||||
|
return includeSystemRoles;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getCapabilities()
|
||||||
|
{
|
||||||
|
return capabilities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class RolesFilterBuilder
|
||||||
|
{
|
||||||
|
private String personId;
|
||||||
|
private boolean includeSystemRoles = true;
|
||||||
|
private List<String> capabilities;
|
||||||
|
|
||||||
|
public RolesFilterBuilder withPersonId(String personId)
|
||||||
|
{
|
||||||
|
this.personId = personId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RolesFilterBuilder withIncludeSystemRoles(Boolean includeSystemRoles)
|
||||||
|
{
|
||||||
|
if (includeSystemRoles != null)
|
||||||
|
{
|
||||||
|
this.includeSystemRoles = includeSystemRoles;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RolesFilterBuilder withCapabilities(List<String> capabilities)
|
||||||
|
{
|
||||||
|
this.capabilities = capabilities;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RolesFilter build()
|
||||||
|
{
|
||||||
|
RolesFilter rolesFilter = new RolesFilter();
|
||||||
|
rolesFilter.personId = this.personId;
|
||||||
|
rolesFilter.includeSystemRoles = this.includeSystemRoles;
|
||||||
|
rolesFilter.capabilities = this.capabilities;
|
||||||
|
return rolesFilter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.model;
|
||||||
|
|
||||||
|
public record CapabilityModel(String name, String title, String description, GroupModel group, int index)
|
||||||
|
{}
|
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.model;
|
||||||
|
|
||||||
|
public record GroupModel(String id, String title)
|
||||||
|
{}
|
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public record RoleModel(String name, String displayLabel, List<CapabilityModel> capabilities, String roleGroupName, String groupShortName, List<String> assignedUsers, List<String> assignedGroups)
|
||||||
|
{}
|
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public record RoleModelList(List<RoleModel> roleModelList)
|
||||||
|
{}
|
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* #%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 info that defines the Information Governance Roles REST API
|
||||||
|
*
|
||||||
|
* @author Damian Ujma
|
||||||
|
*/
|
||||||
|
@WebApi(name = "gs", scope = Api.SCOPE.PUBLIC, version = 1)
|
||||||
|
package org.alfresco.rm.rest.api.roles;
|
||||||
|
|
||||||
|
import org.alfresco.rest.framework.Api;
|
||||||
|
import org.alfresco.rest.framework.WebApi;
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Version label
|
# Version label
|
||||||
version.major=25
|
version.major=25
|
||||||
version.minor=2
|
version.minor=3
|
||||||
version.revision=0
|
version.revision=0
|
||||||
version.label=
|
version.label=
|
||||||
|
|
||||||
|
@@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
* #%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);
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,177 @@
|
|||||||
|
/*
|
||||||
|
* #%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.rm.rest.api.impl;
|
||||||
|
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.role.Role;
|
||||||
|
import org.alfresco.module.org_alfresco_module_rm.test.util.BaseUnitTest;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.Paging;
|
||||||
|
import org.alfresco.rest.framework.resource.parameters.Parameters;
|
||||||
|
import org.alfresco.rest.framework.tools.RecognizedParamsExtractor;
|
||||||
|
import org.alfresco.rm.rest.api.model.CapabilityModel;
|
||||||
|
import org.alfresco.rm.rest.api.model.RoleModel;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.mockito.Mockito.*;
|
||||||
|
|
||||||
|
public class RMRolesImplUnitTest extends BaseUnitTest {
|
||||||
|
|
||||||
|
private final RecognizedParamsExtractor queryExtractor = new RecognizedParamsExtractor() {};
|
||||||
|
|
||||||
|
private RMRolesImpl rmRolesImpl;
|
||||||
|
private FilePlanRoleService mockedFilePlanRoleService;
|
||||||
|
private ApiNodesModelFactory mockedNodesModelFactory;
|
||||||
|
|
||||||
|
private final Capability viewRecordsCapability = mock(Capability.class);
|
||||||
|
private final Capability editMetadataCapability = mock(Capability.class);
|
||||||
|
|
||||||
|
private final Role role1 = new Role("Role1", "Role 1", Set.of(viewRecordsCapability), "Group1");
|
||||||
|
private final Role role2 = new Role("Role2", "Role 2", Set.of(editMetadataCapability), "Group2");
|
||||||
|
|
||||||
|
private final RoleModel roleModel1 = new RoleModel("Role1", "Role 1", List.of(new CapabilityModel("ViewRecords", "", "", null, 0)), "Group1", null, List.of("User1"), List.of("Group1"));
|
||||||
|
private final RoleModel roleModel2 = new RoleModel("Role2", "Role 2", List.of(new CapabilityModel("EditMetadata", "", "", null, 0)), "Group2", null, List.of("User2"), List.of("Group2"));
|
||||||
|
|
||||||
|
private final NodeRef filePlan = new NodeRef("workspace://SpacesStore/testFilePlan");
|
||||||
|
|
||||||
|
private final Parameters parameters = mock(Parameters.class);
|
||||||
|
private final Paging paging = mock(Paging.class);
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
mockedFilePlanRoleService = mock(FilePlanRoleService.class);
|
||||||
|
mockedNodesModelFactory = mock(ApiNodesModelFactory.class);
|
||||||
|
|
||||||
|
rmRolesImpl = new RMRolesImpl();
|
||||||
|
rmRolesImpl.setFilePlanRoleService(mockedFilePlanRoleService);
|
||||||
|
rmRolesImpl.setNodesModelFactory(mockedNodesModelFactory);
|
||||||
|
|
||||||
|
when(mockedFilePlanRoleService.getRoles(filePlan, true)).thenReturn(Set.of(role1, role2));
|
||||||
|
when(mockedNodesModelFactory.createRoleModel(eq(role1), any(), any())).thenReturn(roleModel1);
|
||||||
|
when(mockedNodesModelFactory.createRoleModel(eq(role2), any(), any())).thenReturn(roleModel2);
|
||||||
|
|
||||||
|
when(viewRecordsCapability.getName()).thenReturn("ViewRecords");
|
||||||
|
when(editMetadataCapability.getName()).thenReturn("EditMetadata");
|
||||||
|
|
||||||
|
when(parameters.getPaging()).thenReturn(paging);
|
||||||
|
when(paging.getSkipCount()).thenReturn(0);
|
||||||
|
when(paging.getMaxItems()).thenReturn(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetRoles_NoFilters() {
|
||||||
|
// when
|
||||||
|
CollectionWithPagingInfo<RoleModel> result = rmRolesImpl.getRoles(filePlan, parameters);
|
||||||
|
|
||||||
|
// then
|
||||||
|
List<RoleModel> roleModelList = (List<RoleModel>) result.getCollection();
|
||||||
|
assertEquals(2, (int) result.getTotalItems());
|
||||||
|
assertEquals(List.of(roleModel1, roleModel2), roleModelList);
|
||||||
|
verify(mockedFilePlanRoleService).getRoles(filePlan, true);
|
||||||
|
verify(mockedNodesModelFactory).createRoleModel(eq(role1), any(), any());
|
||||||
|
verify(mockedNodesModelFactory).createRoleModel(eq(role2), any(), any());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetRoles_WithPersonId() {
|
||||||
|
// given
|
||||||
|
String personId = "testUser";
|
||||||
|
when(mockedFilePlanRoleService.getRolesByUser(filePlan, personId, true)).thenReturn(Set.of(role1));
|
||||||
|
when(parameters.getQuery()).thenReturn(queryExtractor.getWhereClause("(personId='" + personId + "')"));
|
||||||
|
|
||||||
|
// when
|
||||||
|
CollectionWithPagingInfo<RoleModel> result = rmRolesImpl.getRoles(filePlan, parameters);
|
||||||
|
|
||||||
|
// then
|
||||||
|
assertEquals(1, (int) result.getTotalItems());
|
||||||
|
assertEquals(List.of(roleModel1), result.getCollection());
|
||||||
|
verify(mockedFilePlanRoleService).getRolesByUser(filePlan, personId, true);
|
||||||
|
verify(mockedNodesModelFactory).createRoleModel(eq(role1), any(), any());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetNonSystemRoles() {
|
||||||
|
//given
|
||||||
|
when(mockedFilePlanRoleService.getRoles(filePlan, false)).thenReturn(Set.of(role2));
|
||||||
|
when(parameters.getQuery()).thenReturn(queryExtractor.getWhereClause("(systemRoles=false)"));
|
||||||
|
|
||||||
|
// when
|
||||||
|
CollectionWithPagingInfo<RoleModel> result = rmRolesImpl.getRoles(filePlan, parameters);
|
||||||
|
|
||||||
|
// then
|
||||||
|
assertEquals(1, (int) result.getTotalItems());
|
||||||
|
assertEquals(List.of(roleModel2), result.getCollection());
|
||||||
|
verify(mockedFilePlanRoleService).getRoles(filePlan, false);
|
||||||
|
verify(mockedNodesModelFactory).createRoleModel(eq(role2), any(), any());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetRoles_WithCapabilitiesFilter() {
|
||||||
|
// given
|
||||||
|
when(parameters.getQuery()).thenReturn(queryExtractor.getWhereClause("(capabilityName IN ('ViewRecords'))"));
|
||||||
|
|
||||||
|
// when
|
||||||
|
CollectionWithPagingInfo<RoleModel> result = rmRolesImpl.getRoles(filePlan, parameters);
|
||||||
|
|
||||||
|
// then
|
||||||
|
assertEquals(1, (int) result.getTotalItems());
|
||||||
|
assertEquals(List.of(roleModel1), result.getCollection());
|
||||||
|
verify(mockedFilePlanRoleService).getRoles(filePlan, true);
|
||||||
|
verify(mockedNodesModelFactory).createRoleModel(eq(role1), any(), any());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGetRoles_IncludeAssignedUsersAndGroups() {
|
||||||
|
// given
|
||||||
|
when(mockedFilePlanRoleService.getRoles(filePlan, true)).thenReturn(Set.of(role1));
|
||||||
|
when(mockedFilePlanRoleService.getAllAssignedToRole(filePlan, "Role1")).thenReturn(Set.of("User1"));
|
||||||
|
when(mockedFilePlanRoleService.getGroupsAssignedToRole(filePlan, "Role1")).thenReturn(Set.of("Group1"));
|
||||||
|
|
||||||
|
when(parameters.getInclude()).thenReturn(List.of("assignedUsers", "assignedGroups"));
|
||||||
|
|
||||||
|
// when
|
||||||
|
CollectionWithPagingInfo<RoleModel> result = rmRolesImpl.getRoles(filePlan, parameters);
|
||||||
|
|
||||||
|
// then
|
||||||
|
List<RoleModel> roleModelList = (List<RoleModel>) result.getCollection();
|
||||||
|
assertEquals(1, (int) result.getTotalItems());
|
||||||
|
assertEquals(List.of(roleModel1), roleModelList);
|
||||||
|
assertEquals(List.of("User1"), roleModelList.get(0).assignedUsers());
|
||||||
|
assertEquals(List.of("Group1"), roleModelList.get(0).assignedGroups());
|
||||||
|
verify(mockedFilePlanRoleService).getRoles(filePlan, true);
|
||||||
|
verify(mockedFilePlanRoleService).getAllAssignedToRole(filePlan, "Role1");
|
||||||
|
verify(mockedFilePlanRoleService).getGroupsAssignedToRole(filePlan, "Role1");
|
||||||
|
verify(mockedNodesModelFactory).createRoleModel(role1, List.of("User1"), List.of("Group1"));
|
||||||
|
}
|
||||||
|
}
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -540,6 +540,66 @@ paths:
|
|||||||
description: Unexpected error
|
description: Unexpected error
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Error'
|
$ref: '#/definitions/Error'
|
||||||
|
'/file-plans/{filePlanId}/roles':
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- file-plans
|
||||||
|
summary: Get roles in a file plan
|
||||||
|
description: |
|
||||||
|
Gets a list of roles for the specified file plan **filePlanId**.
|
||||||
|
|
||||||
|
You can use the **include** parameter to return additional information.
|
||||||
|
|
||||||
|
The **where** parameter can also be used to filter by **personId**, **systemRoles** and **capabilityName**.
|
||||||
|
|
||||||
|
You can use the **where** parameter to
|
||||||
|
* filter roles by user:
|
||||||
|
`where=(personId='admin')`
|
||||||
|
|
||||||
|
* not include system roles in the results:
|
||||||
|
`where=(systemRoles=false)`
|
||||||
|
|
||||||
|
* filter roles by specified capabilities:
|
||||||
|
`where=(capabilityName in ('AddToHold', 'ViewRecords'))`
|
||||||
|
|
||||||
|
This may be combined with all filter, as shown below:
|
||||||
|
|
||||||
|
`where=(systemRoles=false and personId='johndoe' and capabilityName in ('AddToHold', 'ViewRecords'))`
|
||||||
|
|
||||||
|
operationId: getFilePlanRoles
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/parameters/filePlanIdWithAliasParam'
|
||||||
|
- $ref: '#/parameters/whereParam'
|
||||||
|
- $ref: '#/parameters/rolesIncludeParam'
|
||||||
|
- $ref: '#/parameters/skipCountParam'
|
||||||
|
- $ref: '#/parameters/maxItemsParam'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful response
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
list:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/RoleModel'
|
||||||
|
pagination:
|
||||||
|
$ref: '#/definitions/Pagination'
|
||||||
|
'400':
|
||||||
|
description: |
|
||||||
|
Invalid parameter: value of **maxItems** or **skipCount**, or **include**, or **where** is invalid
|
||||||
|
'401':
|
||||||
|
description: Authentication failed
|
||||||
|
'403':
|
||||||
|
description: Current user does not have permission to read **filePlanId**
|
||||||
|
'404':
|
||||||
|
description: "**filePlanId** does not exist"
|
||||||
|
default:
|
||||||
|
description: Unexpected error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Error'
|
||||||
## Unfiled records containers
|
## Unfiled records containers
|
||||||
'/unfiled-containers/{unfiledContainerId}':
|
'/unfiled-containers/{unfiledContainerId}':
|
||||||
get:
|
get:
|
||||||
@@ -3307,6 +3367,21 @@ parameters:
|
|||||||
* actions
|
* actions
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
rolesIncludeParam:
|
||||||
|
name: include
|
||||||
|
in: query
|
||||||
|
description: |
|
||||||
|
Returns additional information about roles. Any optional field from the response model can be requested. For example:
|
||||||
|
* assignedUsers
|
||||||
|
* assignedGroups
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
whereParam:
|
||||||
|
name: where
|
||||||
|
in: query
|
||||||
|
description: A string to restrict the returned objects by using a predicate.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
definitions:
|
definitions:
|
||||||
FilePlanComponentBodyUpdate:
|
FilePlanComponentBodyUpdate:
|
||||||
type: object
|
type: object
|
||||||
@@ -4389,6 +4464,49 @@ definitions:
|
|||||||
query:
|
query:
|
||||||
description: The query which may have been generated in some way from the userQuery
|
description: The query which may have been generated in some way from the userQuery
|
||||||
type: string
|
type: string
|
||||||
|
CapabilityModel:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
group:
|
||||||
|
$ref: '#/definitions/GroupModel'
|
||||||
|
index:
|
||||||
|
type: integer
|
||||||
|
GroupModel:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
RoleModel:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
displayLabel:
|
||||||
|
type: string
|
||||||
|
capabilities:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/CapabilityModel'
|
||||||
|
roleGroupName:
|
||||||
|
type: string
|
||||||
|
groupShortName:
|
||||||
|
type: string
|
||||||
|
assignedUsers:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
assignedGroups:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
HoldBulkOperation:
|
HoldBulkOperation:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -4929,4 +5047,4 @@ definitions:
|
|||||||
- SiteConsumer
|
- SiteConsumer
|
||||||
- SiteCollaborator
|
- SiteCollaborator
|
||||||
- SiteContributor
|
- SiteContributor
|
||||||
- SiteManager
|
- SiteManager
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -70,11 +70,6 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
|
@@ -80,6 +80,11 @@ 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);
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -126,11 +126,6 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -247,11 +247,6 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.antlr</groupId>
|
<groupId>org.antlr</groupId>
|
||||||
<artifactId>gunit</artifactId>
|
<artifactId>gunit</artifactId>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -46,11 +46,6 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -9,6 +9,6 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
</project>
|
</project>
|
||||||
|
@@ -1,141 +0,0 @@
|
|||||||
Instructions for Generating Repository SSL Keystores
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
<store password> is the keystore password. The file ${dir.keystore}/ssl-keystore-passwords.properties contains passwords for the SSL keystore,
|
|
||||||
${dir.keystore}/ssl-truststore-passwords.properties contains passwords for the SSL truststore.
|
|
||||||
|
|
||||||
These instructions will create an RSA public/private key pair for the repository with a certificate that has been signed by the Alfresco Certificate Authority (CA).
|
|
||||||
It will also create a truststore for the repository containing the CA certificate; this will be used to authenticate connections to specific repository
|
|
||||||
URLs from Solr. It assumes the existence of the Alfresco CA key and certificate to sign the repository certificate; for security reasons these are not generally available.
|
|
||||||
You can either generate your own CA key and certificate (see instructions below) or use a recognised Certificate Authority such as Verisign. For Alfresco employees the key
|
|
||||||
and certificate are available in svn.
|
|
||||||
|
|
||||||
(i) Generate the repository public/private key pair in a keystore:
|
|
||||||
|
|
||||||
$ keytool -genkey -alias ssl.repo -keyalg RSA -keystore ssl.keystore -storetype JCEKS -storepass <store password>
|
|
||||||
Enter keystore password:
|
|
||||||
Re-enter new password:
|
|
||||||
What is your first and last name?
|
|
||||||
[Unknown]: Alfresco Repository
|
|
||||||
What is the name of your organizational unit?
|
|
||||||
[Unknown]:
|
|
||||||
What is the name of your organization?
|
|
||||||
[Unknown]: Alfresco Software Ltd.
|
|
||||||
What is the name of your City or Locality?
|
|
||||||
[Unknown]: Maidenhead
|
|
||||||
What is the name of your State or Province?
|
|
||||||
[Unknown]: UK
|
|
||||||
What is the two-letter country code for this unit?
|
|
||||||
[Unknown]: GB
|
|
||||||
Is CN=Alfresco Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB correct?
|
|
||||||
[no]: yes
|
|
||||||
|
|
||||||
Enter key password for <ssl.repo>
|
|
||||||
(RETURN if same as keystore password):
|
|
||||||
|
|
||||||
(ii) Generate a certificate request for the repository key
|
|
||||||
|
|
||||||
$ keytool -keystore ssl.keystore -alias ssl.repo -certreq -file repo.csr -storetype JCEKS -storepass <store password>
|
|
||||||
|
|
||||||
(iii) Alfresco CA signs the certificate request, creating a certificate that is valid for 365 days.
|
|
||||||
|
|
||||||
$ openssl x509 -CA ca.crt -CAkey ca.key -CAcreateserial -req -in repo.csr -out repo.crt -days 365
|
|
||||||
Signature ok
|
|
||||||
subject=/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Alfresco Repository
|
|
||||||
Getting CA Private Key
|
|
||||||
Enter pass phrase for ca.key:
|
|
||||||
|
|
||||||
(iv) Import the Alfresco CA key into the repository key store
|
|
||||||
|
|
||||||
$ keytool -import -alias ssl.alfreco.ca -file ca.crt -keystore ssl.keystore -storetype JCEKS -storepass <store password>
|
|
||||||
Enter keystore password:
|
|
||||||
Owner: CN=Alfresco CA, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB
|
|
||||||
Issuer: CN=Alfresco CA, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB
|
|
||||||
Serial number: 805ba6dc8f62f8b8
|
|
||||||
Valid from: Fri Aug 12 13:28:58 BST 2011 until: Mon Aug 09 13:28:58 BST 2021
|
|
||||||
Certificate fingerprints:
|
|
||||||
MD5: 4B:45:94:2D:8E:98:E8:12:04:67:AD:AE:48:3C:F5:A0
|
|
||||||
SHA1: 74:42:22:D0:52:AD:82:7A:FD:37:46:37:91:91:F4:77:89:3A:C9:A3
|
|
||||||
Signature algorithm name: SHA1withRSA
|
|
||||||
Version: 3
|
|
||||||
|
|
||||||
Extensions:
|
|
||||||
|
|
||||||
#1: ObjectId: 2.5.29.14 Criticality=false
|
|
||||||
SubjectKeyIdentifier [
|
|
||||||
KeyIdentifier [
|
|
||||||
0000: 08 42 40 DC FE 4A 50 87 05 2B 38 4D 92 70 8E 51 .B@..JP..+8M.p.Q
|
|
||||||
0010: 4E 38 71 D6 N8q.
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
#2: ObjectId: 2.5.29.19 Criticality=false
|
|
||||||
BasicConstraints:[
|
|
||||||
CA:true
|
|
||||||
PathLen:2147483647
|
|
||||||
]
|
|
||||||
|
|
||||||
#3: ObjectId: 2.5.29.35 Criticality=false
|
|
||||||
AuthorityKeyIdentifier [
|
|
||||||
KeyIdentifier [
|
|
||||||
0000: 08 42 40 DC FE 4A 50 87 05 2B 38 4D 92 70 8E 51 .B@..JP..+8M.p.Q
|
|
||||||
0010: 4E 38 71 D6 N8q.
|
|
||||||
]
|
|
||||||
|
|
||||||
[CN=Alfresco CA, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB]
|
|
||||||
SerialNumber: [ 805ba6dc 8f62f8b8]
|
|
||||||
]
|
|
||||||
|
|
||||||
Trust this certificate? [no]: yes
|
|
||||||
Certificate was added to keystore
|
|
||||||
|
|
||||||
(v) Import the CA-signed repository certificate into the repository keystore
|
|
||||||
|
|
||||||
$ keytool -import -alias ssl.repo -file repo.crt -keystore ssl.keystore -storetype JCEKS -storepass <store password>
|
|
||||||
Enter keystore password:
|
|
||||||
Certificate reply was installed in keystore
|
|
||||||
|
|
||||||
(vi) Convert the repository keystore to a pkcs12 keystore (for use in browsers such as Firefox). Give the pkcs12 key store the key store password 'alfresco'.
|
|
||||||
|
|
||||||
keytool -importkeystore -srckeystore ssl.keystore -srcstorepass <keystore password> -srcstoretype JCEKS -srcalias ssl.repo -srckeypass kT9X6oe68t -destkeystore firefox.p12 -deststoretype pkcs12 -deststorepass alfresco -destalias ssl.repo -destkeypass alfresco
|
|
||||||
|
|
||||||
(vi) Create a repository truststore containing the Alfresco CA certificate
|
|
||||||
|
|
||||||
keytool -import -alias ssl.alfreco.ca -file ca.crt -keystore ssl.keystore -storetype JCEKS -storepass <store password>
|
|
||||||
keytool -import -alias alfreco.ca -file ca.crt -keystore ssl.truststore -storetype JCEKS -storepass <store password>
|
|
||||||
|
|
||||||
(vii) Copy the keystore and truststore to the repository keystore location defined by the property 'dir.keystore'.
|
|
||||||
(viii) Update the SSL properties i.e. properties starting with the prefixes 'alfresco.encryption.ssl.keystore' and 'alfresco.encryption.ssl.truststore'.
|
|
||||||
|
|
||||||
Instructions for Generating a Certificate Authority (CA) Key and Certificate
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
(i) Generate the CA private key
|
|
||||||
|
|
||||||
$ openssl genrsa -des3 -out ca.key 1024
|
|
||||||
Generating RSA private key, 1024 bit long modulus
|
|
||||||
..........++++++
|
|
||||||
..++++++
|
|
||||||
e is 65537 (0x10001)
|
|
||||||
Enter pass phrase for ca.key:
|
|
||||||
Verifying - Enter pass phrase for ca.key:
|
|
||||||
|
|
||||||
(ii) Generate the CA self-signed certificate
|
|
||||||
|
|
||||||
$ openssl req -new -x509 -days 3650 -key ca.key -out ca.crt
|
|
||||||
Enter pass phrase for ca.key:
|
|
||||||
You are about to be asked to enter information that will be incorporated
|
|
||||||
into your certificate request.
|
|
||||||
What you are about to enter is what is called a Distinguished Name or a DN.
|
|
||||||
There are quite a few fields but you can leave some blank
|
|
||||||
For some fields there will be a default value,
|
|
||||||
If you enter '.', the field will be left blank.
|
|
||||||
-----
|
|
||||||
Country Name (2 letter code) [AU]:GB
|
|
||||||
State or Province Name (full name) [Some-State]:UK
|
|
||||||
Locality Name (eg, city) []:Maidenhead
|
|
||||||
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Alfresco Software Ltd.
|
|
||||||
Organizational Unit Name (eg, section) []:
|
|
||||||
Common Name (eg, YOUR name) []:Alfresco CA
|
|
||||||
Email Address []:
|
|
||||||
|
|
@@ -1,58 +0,0 @@
|
|||||||
@rem Please edit the variables below to suit your installation
|
|
||||||
@rem Note: for an installation created by the Alfresco installer, you only need to edit ALFRESCO_HOME
|
|
||||||
|
|
||||||
@rem Alfresco installation directory
|
|
||||||
set ALFRESCO_HOME=C:\Alfresco-5.2
|
|
||||||
@rem The directory containing the alfresco keystores, as referenced by keystoreFile and truststoreFile attributes in tomcat\conf\server.xml
|
|
||||||
set ALFRESCO_KEYSTORE_HOME=%ALFRESCO_HOME%\alf_data\keystore
|
|
||||||
@rem Java installation directory
|
|
||||||
set JAVA_HOME=%ALFRESCO_HOME%\java
|
|
||||||
@rem Location in which new keystore files will be generated
|
|
||||||
set CERTIFICATE_HOME=%USERPROFILE%
|
|
||||||
@rem The repository server certificate subject name, as specified in tomcat\conf\tomcat-users.xml with roles="repository"
|
|
||||||
set REPO_CERT_DNAME=CN=Alfresco Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB
|
|
||||||
@rem The SOLR client certificate subject name, as specified in tomcat\conf\tomcat-users.xml with roles="repoclient"
|
|
||||||
set SOLR_CLIENT_CERT_DNAME=CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB
|
|
||||||
@rem The number of days before the certificate expires
|
|
||||||
set CERTIFICATE_VALIDITY=36525
|
|
||||||
|
|
||||||
@rem Ensure certificate output dir exists
|
|
||||||
@if not exist "%CERTIFICATE_HOME%" mkdir "%CERTIFICATE_HOME%"
|
|
||||||
|
|
||||||
@rem Remove old output files (note they are backed up elsewhere)
|
|
||||||
@if exist "%CERTIFICATE_HOME%\ssl.keystore" del "%CERTIFICATE_HOME%\ssl.keystore"
|
|
||||||
@if exist "%CERTIFICATE_HOME%\ssl.truststore" del "%CERTIFICATE_HOME%\ssl.truststore"
|
|
||||||
@if exist "%CERTIFICATE_HOME%\browser.p12" del "%CERTIFICATE_HOME%\browser.p12"
|
|
||||||
@if exist "%CERTIFICATE_HOME%\ssl.repo.client.keystore" del "%CERTIFICATE_HOME%\ssl.repo.client.keystore"
|
|
||||||
@if exist "%CERTIFICATE_HOME%\ssl.repo.client.truststore" del "%CERTIFICATE_HOME%\ssl.repo.client.truststore"
|
|
||||||
|
|
||||||
@rem Generate new self-signed certificates for the repository and solr
|
|
||||||
"%JAVA_HOME%\bin\keytool" -genkeypair -keyalg RSA -dname "%REPO_CERT_DNAME%" -validity %CERTIFICATE_VALIDITY% -alias ssl.repo -keypass kT9X6oe68t -keystore "%CERTIFICATE_HOME%\ssl.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
"%JAVA_HOME%\bin\keytool" -exportcert -alias ssl.repo -file "%CERTIFICATE_HOME%\ssl.repo.crt" -keystore "%CERTIFICATE_HOME%\ssl.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
"%JAVA_HOME%\bin\keytool" -genkeypair -keyalg RSA -dname "%SOLR_CLIENT_CERT_DNAME%" -validity %CERTIFICATE_VALIDITY% -alias ssl.repo.client -keypass kT9X6oe68t -keystore "%CERTIFICATE_HOME%\ssl.repo.client.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
"%JAVA_HOME%\bin\keytool" -exportcert -alias ssl.repo.client -file "%CERTIFICATE_HOME%\ssl.repo.client.crt" -keystore "%CERTIFICATE_HOME%\ssl.repo.client.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
|
|
||||||
@rem Create trust relationship between repository and solr
|
|
||||||
"%JAVA_HOME%\bin\keytool" -importcert -noprompt -alias ssl.repo.client -file "%CERTIFICATE_HOME%\ssl.repo.client.crt" -keystore "%CERTIFICATE_HOME%\ssl.truststore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
@rem Create trust relationship between repository and itself - used for searches
|
|
||||||
"%JAVA_HOME%\bin\keytool" -importcert -noprompt -alias ssl.repo -file "%CERTIFICATE_HOME%\ssl.repo.crt" -keystore "%CERTIFICATE_HOME%\ssl.truststore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
@rem Create trust relationship between solr and repository
|
|
||||||
"%JAVA_HOME%\bin\keytool" -importcert -noprompt -alias ssl.repo -file "%CERTIFICATE_HOME%\ssl.repo.crt" -keystore "%CERTIFICATE_HOME%\ssl.repo.client.truststore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
@rem Export repository keystore to pkcs12 format for browser compatibility
|
|
||||||
"%JAVA_HOME%\bin\keytool" -importkeystore -srckeystore "%CERTIFICATE_HOME%\ssl.keystore" -srcstorepass kT9X6oe68t -srcstoretype JCEKS -srcalias ssl.repo -srckeypass kT9X6oe68t -destkeystore "%CERTIFICATE_HOME%\browser.p12" -deststoretype pkcs12 -deststorepass alfresco -destalias ssl.repo -destkeypass alfresco
|
|
||||||
|
|
||||||
@rem Ensure keystore dir actually exists
|
|
||||||
@if not exist "%ALFRESCO_KEYSTORE_HOME%" mkdir "%ALFRESCO_KEYSTORE_HOME%"
|
|
||||||
|
|
||||||
@rem Install the new files
|
|
||||||
copy /Y "%CERTIFICATE_HOME%\ssl.keystore" "%ALFRESCO_KEYSTORE_HOME%\ssl.keystore"
|
|
||||||
copy /Y "%CERTIFICATE_HOME%\ssl.truststore" "%ALFRESCO_KEYSTORE_HOME%\ssl.truststore"
|
|
||||||
copy /Y "%CERTIFICATE_HOME%\browser.p12" "%ALFRESCO_KEYSTORE_HOME%\browser.p12"
|
|
||||||
|
|
||||||
@echo ****************************************
|
|
||||||
@echo You must copy the following files to the correct location.
|
|
||||||
@echo %CERTIFICATE_HOME%\ssl.repo.client.keystore
|
|
||||||
@echo %CERTIFICATE_HOME%\ssl.repo.client.truststore
|
|
||||||
@echo eg. for Solr 4 the location is SOLR_HOME\workspace-SpacesStore\conf and SOLR_HOME\archive-SpacesStore\conf
|
|
||||||
@echo Please ensure that you set dir.keystore=%ALFRESCO_KEYSTORE_HOME% in alfresco-global.properties
|
|
||||||
@echo ****************************************
|
|
@@ -1,82 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
# Please edit the variables below to suit your installation
|
|
||||||
# Note: for an installation created by the Alfresco installer, you only need to edit ALFRESCO_HOME
|
|
||||||
|
|
||||||
# Alfresco installation directory
|
|
||||||
if [ -z "$ALFRESCO_HOME" ]; then
|
|
||||||
ALFRESCO_HOME=/opt/alfresco-5.2
|
|
||||||
echo "Setting ALFRESCO_HOME to $ALFRESCO_HOME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# The directory containing the alfresco keystores, as referenced by keystoreFile and truststoreFile attributes in tomcat/conf/server.xml
|
|
||||||
ALFRESCO_KEYSTORE_HOME=$ALFRESCO_HOME/alf_data/keystore
|
|
||||||
|
|
||||||
# Location in which new keystore files will be generated
|
|
||||||
if [ -z "$CERTIFICATE_HOME" ]; then
|
|
||||||
CERTIFICATE_HOME=$HOME
|
|
||||||
echo "Certificates will be generated in $CERTIFICATE_HOME and then moved to $ALFRESCO_KEYSTORE_HOME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Java installation directory
|
|
||||||
JAVA_HOME=$ALFRESCO_HOME/java
|
|
||||||
|
|
||||||
# The repository server certificate subject name, as specified in tomcat/conf/tomcat-users.xml with roles="repository"
|
|
||||||
REPO_CERT_DNAME="CN=Alfresco Repository, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB"
|
|
||||||
# The SOLR client certificate subject name, as specified in tomcat/conf/tomcat-users.xml with roles="repoclient"
|
|
||||||
SOLR_CLIENT_CERT_DNAME="CN=Alfresco Repository Client, OU=Unknown, O=Alfresco Software Ltd., L=Maidenhead, ST=UK, C=GB"
|
|
||||||
# The number of days before the certificate expires
|
|
||||||
CERTIFICATE_VALIDITY=36525
|
|
||||||
|
|
||||||
# Stop
|
|
||||||
if [ -f "$ALFRESCO_HOME/alfresco.sh" ]; then "$ALFRESCO_HOME/alfresco.sh" stop; fi
|
|
||||||
|
|
||||||
# Ensure certificate output dir exists
|
|
||||||
mkdir -p "$CERTIFICATE_HOME"
|
|
||||||
|
|
||||||
# Remove old output files (note they are backed up elsewhere)
|
|
||||||
if [ -f "$CERTIFICATE_HOME/ssl.keystore" ]; then rm "$CERTIFICATE_HOME/ssl.keystore"; fi
|
|
||||||
if [ -f "$CERTIFICATE_HOME/ssl.truststore" ]; then rm "$CERTIFICATE_HOME/ssl.truststore"; fi
|
|
||||||
if [ -f "$CERTIFICATE_HOME/browser.p12" ]; then rm "$CERTIFICATE_HOME/browser.p12"; fi
|
|
||||||
if [ -f "$CERTIFICATE_HOME/ssl.repo.client.keystore" ]; then rm "$CERTIFICATE_HOME/ssl.repo.client.keystore"; fi
|
|
||||||
if [ -f "$CERTIFICATE_HOME/ssl.repo.client.truststore" ]; then rm "$CERTIFICATE_HOME/ssl.repo.client.truststore"; fi
|
|
||||||
|
|
||||||
# Generate new self-signed certificates for the repository and solr
|
|
||||||
"$JAVA_HOME/bin/keytool" -genkeypair -keyalg RSA -dname "$REPO_CERT_DNAME" -validity $CERTIFICATE_VALIDITY -alias ssl.repo -keypass kT9X6oe68t -keystore "$CERTIFICATE_HOME/ssl.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
"$JAVA_HOME/bin/keytool" -exportcert -alias ssl.repo -file "$CERTIFICATE_HOME/ssl.repo.crt" -keystore "$CERTIFICATE_HOME/ssl.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
"$JAVA_HOME/bin/keytool" -genkeypair -keyalg RSA -dname "$SOLR_CLIENT_CERT_DNAME" -validity $CERTIFICATE_VALIDITY -alias ssl.repo.client -keypass kT9X6oe68t -keystore "$CERTIFICATE_HOME/ssl.repo.client.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
"$JAVA_HOME/bin/keytool" -exportcert -alias ssl.repo.client -file "$CERTIFICATE_HOME/ssl.repo.client.crt" -keystore "$CERTIFICATE_HOME/ssl.repo.client.keystore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
|
|
||||||
# Create trust relationship between repository and solr
|
|
||||||
"$JAVA_HOME/bin/keytool" -importcert -noprompt -alias ssl.repo.client -file "$CERTIFICATE_HOME/ssl.repo.client.crt" -keystore "$CERTIFICATE_HOME/ssl.truststore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
# Create trust relationship between repository and itself - used for searches
|
|
||||||
"$JAVA_HOME/bin/keytool" -importcert -noprompt -alias ssl.repo -file "$CERTIFICATE_HOME/ssl.repo.crt" -keystore "$CERTIFICATE_HOME/ssl.truststore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
# Create trust relationship between solr and repository
|
|
||||||
"$JAVA_HOME/bin/keytool" -importcert -noprompt -alias ssl.repo -file "$CERTIFICATE_HOME/ssl.repo.crt" -keystore "$CERTIFICATE_HOME/ssl.repo.client.truststore" -storetype JCEKS -storepass kT9X6oe68t
|
|
||||||
# Export repository keystore to pkcs12 format for browser compatibility
|
|
||||||
"$JAVA_HOME/bin/keytool" -importkeystore -srckeystore "$CERTIFICATE_HOME/ssl.keystore" -srcstorepass kT9X6oe68t -srcstoretype JCEKS -srcalias ssl.repo -srckeypass kT9X6oe68t -destkeystore "$CERTIFICATE_HOME/browser.p12" -deststoretype pkcs12 -deststorepass alfresco -destalias ssl.repo -destkeypass alfresco
|
|
||||||
|
|
||||||
# Ensure keystore dir actually exists
|
|
||||||
mkdir -p "$ALFRESCO_KEYSTORE_HOME"
|
|
||||||
|
|
||||||
# Back up old files
|
|
||||||
cp "$ALFRESCO_KEYSTORE_HOME/ssl.keystore" "$ALFRESCO_KEYSTORE_HOME/ssl.keystore.old"
|
|
||||||
cp "$ALFRESCO_KEYSTORE_HOME/ssl.truststore" "$ALFRESCO_KEYSTORE_HOME/ssl.truststore.old"
|
|
||||||
cp "$ALFRESCO_KEYSTORE_HOME/browser.p12" "$ALFRESCO_KEYSTORE_HOME/browser.p12.old"
|
|
||||||
|
|
||||||
# Install the new files
|
|
||||||
cp "$CERTIFICATE_HOME/ssl.keystore" "$ALFRESCO_KEYSTORE_HOME/ssl.keystore"
|
|
||||||
cp "$CERTIFICATE_HOME/ssl.truststore" "$ALFRESCO_KEYSTORE_HOME/ssl.truststore"
|
|
||||||
cp "$CERTIFICATE_HOME/browser.p12" "$ALFRESCO_KEYSTORE_HOME/browser.p12"
|
|
||||||
|
|
||||||
echo " "
|
|
||||||
echo "*******************************************"
|
|
||||||
echo "You must copy the following files to the correct location."
|
|
||||||
echo " "
|
|
||||||
echo " $CERTIFICATE_HOME/ssl.repo.client.keystore"
|
|
||||||
echo " $CERTIFICATE_HOME/ssl.repo.client.truststore"
|
|
||||||
echo " eg. for Solr 4 the location is SOLR_HOME/workspace-SpacesStore/conf/ and SOLR_HOME/archive-SpacesStore/conf/"
|
|
||||||
echo " "
|
|
||||||
echo "$ALFRESCO_KEYSTORE_HOME/browser.p12 has also been generated."
|
|
||||||
echo " "
|
|
||||||
echo "Please ensure that you set dir.keystore=$ALFRESCO_KEYSTORE_HOME in alfresco-global.properties"
|
|
||||||
echo "*******************************************"
|
|
@@ -1,6 +1,5 @@
|
|||||||
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
|
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-tomcat
|
||||||
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:9622418e142fb4fe1c5320666ad61ea292bc5c98f3dd0b550b6add33d18f659f
|
FROM alfresco/alfresco-base-tomcat:tomcat10-jre17-rockylinux9@sha256:00d89fb84bda7bb37c17b0117adb2cfe4f7cbddcd6c1e42b0a67ea8dbb41a734
|
||||||
|
|
||||||
# Set default docker_context.
|
# Set default docker_context.
|
||||||
ARG resource_path=target
|
ARG resource_path=target
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
SOLR6_TAG=2.0.15
|
SOLR6_TAG=2.0.16
|
||||||
POSTGRES_TAG=16.6
|
POSTGRES_TAG=16.6
|
||||||
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
@@ -49,5 +49,6 @@ then
|
|||||||
echo "Docker Compose started ok"
|
echo "Docker Compose started ok"
|
||||||
else
|
else
|
||||||
echo "Docker Compose failed to start" >&2
|
echo "Docker Compose failed to start" >&2
|
||||||
|
docker compose ${DOCKER_COMPOSES} logs --tail 200
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
**TAS**( **T**est **A**utomation **S**ystem)- **CMIS** is the project that handles the automated tests related only to CMIS API integrated with Alfresco One [Alfresco CMIS API](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Develop/Reference/CMIS-API).
|
**TAS**( **T**est **A**utomation **S**ystem)- **CMIS** is the project that handles the automated tests related only to CMIS API integrated with Alfresco One [Alfresco CMIS API](https://support.hyland.com/access?dita:id=kvf1721390177551&vrm_version=25.2).
|
||||||
|
|
||||||
It is based on Apache Maven, compatible with major IDEs and is using also Spring capabilities for dependency injection.
|
It is based on Apache Maven, compatible with major IDEs and is using also Spring capabilities for dependency injection.
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<organization>
|
<organization>
|
||||||
@@ -68,16 +68,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
@@ -36,11 +36,6 @@
|
|||||||
<artifactId>jakarta.mail-api</artifactId>
|
<artifactId>jakarta.mail-api</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
@@ -44,18 +44,6 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sun.mail</groupId>
|
<groupId>com.sun.mail</groupId>
|
||||||
<artifactId>jakarta.mail</artifactId>
|
<artifactId>jakarta.mail</artifactId>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -8,7 +8,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -79,18 +79,6 @@
|
|||||||
<version>${commons-lang3.version}</version>
|
<version>${commons-lang3.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.awaitility</groupId>
|
<groupId>org.awaitility</groupId>
|
||||||
<artifactId>awaitility</artifactId>
|
<artifactId>awaitility</artifactId>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2022 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
|
||||||
@@ -747,7 +747,7 @@ public class CreateRulesTests extends RulesRestTest
|
|||||||
.createSingleRule(ruleModel);
|
.createSingleRule(ruleModel);
|
||||||
|
|
||||||
restClient.assertStatusCodeIs(NOT_FOUND);
|
restClient.assertStatusCodeIs(NOT_FOUND);
|
||||||
restClient.assertLastError().containsSummary("The entity with id: non-existent-node was not found");
|
restClient.assertLastError().containsSummary("Destination folder having Id: non-existent-node no longer exists. Please update your rule definition.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
* #%L
|
||||||
|
* Alfresco Repository
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2025 - 2025 Alfresco Software Limited
|
||||||
|
* %%
|
||||||
|
* This file is part of the Alfresco software.
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
*
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* #L%
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.alfresco.rest.search;
|
||||||
|
|
||||||
|
import static org.testng.Assert.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
import org.alfresco.rest.RestTest;
|
||||||
|
import org.alfresco.rest.model.RestNodeModel;
|
||||||
|
import org.alfresco.utility.RetryOperation;
|
||||||
|
import org.alfresco.utility.Utility;
|
||||||
|
import org.alfresco.utility.model.ContentModel;
|
||||||
|
import org.alfresco.utility.model.FileModel;
|
||||||
|
import org.alfresco.utility.model.TestGroup;
|
||||||
|
import org.alfresco.utility.model.UserModel;
|
||||||
|
import org.alfresco.utility.testrail.ExecutionType;
|
||||||
|
import org.alfresco.utility.testrail.annotation.TestRail;
|
||||||
|
|
||||||
|
public class NodeContentTest extends RestTest
|
||||||
|
{
|
||||||
|
|
||||||
|
@TestRail(section = {TestGroup.REST_API,
|
||||||
|
TestGroup.SEARCH}, executionType = ExecutionType.SANITY, description = "Check basic functionality of GET queries/sites")
|
||||||
|
@Test(groups = {TestGroup.REST_API, TestGroup.RATINGS, TestGroup.CORE})
|
||||||
|
public void testNodeContent() throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
UserModel adminUser = dataContent.getAdminUser();
|
||||||
|
final String fileName = "nodecontent.pdf";
|
||||||
|
final String term = "babekyrtso";
|
||||||
|
|
||||||
|
FileModel fileModel = FileModel.getFileModelBasedOnTestDataFile(fileName);
|
||||||
|
restClient.authenticateUser(adminUser)
|
||||||
|
.configureRequestSpec()
|
||||||
|
.addMultiPart("filedata", fileModel.toFile());
|
||||||
|
RestNodeModel node = restClient.authenticateUser(adminUser).withCoreAPI().usingNode(ContentModel.my()).createNode();
|
||||||
|
restClient.assertStatusCodeIs(HttpStatus.CREATED);
|
||||||
|
|
||||||
|
SearchRequest query = new SearchRequest();
|
||||||
|
RestRequestQueryModel queryModel = new RestRequestQueryModel();
|
||||||
|
queryModel.setLanguage("afts");
|
||||||
|
queryModel.setQuery(term);
|
||||||
|
query.setQuery(queryModel);
|
||||||
|
|
||||||
|
RetryOperation op = () -> {
|
||||||
|
List<SearchNodeModel> entries = restClient.authenticateUser(adminUser)
|
||||||
|
.withSearchAPI()
|
||||||
|
.search(query).getEntries();
|
||||||
|
|
||||||
|
assertFalse(CollectionUtils.isEmpty(entries), "Search results should not be empty");
|
||||||
|
boolean fileFound = entries.stream()
|
||||||
|
.map(SearchNodeModel::getModel)
|
||||||
|
.anyMatch(e -> fileName.equals(e.getName()));
|
||||||
|
assertTrue(fileFound, "Search results should contain the file: " + fileName);
|
||||||
|
|
||||||
|
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||||
|
};
|
||||||
|
Utility.sleep(300, 100000, op);
|
||||||
|
|
||||||
|
restClient.authenticateUser(adminUser)
|
||||||
|
.withCoreAPI()
|
||||||
|
.usingNode(ContentModel.my())
|
||||||
|
.deleteNode(node);
|
||||||
|
restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
}
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
BIN
packaging/tests/tas-restapi/src/test/resources/shared-resources/testdata/nodecontent.pdf
vendored
Normal file
BIN
packaging/tests/tas-restapi/src/test/resources/shared-resources/testdata/nodecontent.pdf
vendored
Normal file
Binary file not shown.
@@ -15,6 +15,7 @@
|
|||||||
<package name="org.alfresco.rest.people.*"/>
|
<package name="org.alfresco.rest.people.*"/>
|
||||||
<package name="org.alfresco.rest.queries.*"/>
|
<package name="org.alfresco.rest.queries.*"/>
|
||||||
<package name="org.alfresco.rest.ratings.*"/>
|
<package name="org.alfresco.rest.ratings.*"/>
|
||||||
|
<package name="org.alfresco.rest.search.*"/>
|
||||||
</packages>
|
</packages>
|
||||||
</test>
|
</test>
|
||||||
</suite>
|
</suite>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<developers>
|
<developers>
|
||||||
@@ -31,11 +31,6 @@
|
|||||||
<artifactId>webdav</artifactId>
|
<artifactId>webdav</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
com.epam.reportportal.testng.ReportPortalTestNGListener
|
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
<!-- Resource defaultTransactionIsolation="-1" defaultAutoCommit="false" maxActive="100" initialSize="10" password="alfresco" username="alfresco" url="jdbc:mysql:///alfresco" driverClassName="org.gjt.mm.mysql.Driver" type="javax.sql.DataSource" auth="Container" name="jdbc/dataSource"/-->
|
<!-- Resource defaultTransactionIsolation="-1" defaultAutoCommit="false" maxActive="100" initialSize="10" password="alfresco" username="alfresco" url="jdbc:mysql:///alfresco" driverClassName="org.gjt.mm.mysql.Driver" type="javax.sql.DataSource" auth="Container" name="jdbc/dataSource"/-->
|
||||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.SQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
||||||
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
||||||
|
@@ -500,7 +500,7 @@
|
|||||||
org.hibernate.dialect.MySQLInnoDBDialect,
|
org.hibernate.dialect.MySQLInnoDBDialect,
|
||||||
org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect,
|
org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect,
|
||||||
org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect,
|
org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect,
|
||||||
org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect</description>
|
org.alfresco.repo.domain.hibernate.dialect.SQLServerDialect, org.hibernate.dialect.PostgreSQLDialect</description>
|
||||||
<env-entry-name>properties/hibernate.dialect</env-entry-name>
|
<env-entry-name>properties/hibernate.dialect</env-entry-name>
|
||||||
<env-entry-type>java.lang.String</env-entry-type>
|
<env-entry-type>java.lang.String</env-entry-type>
|
||||||
<env-entry-value/> <!-- Empty value included for JBoss compatibility -->
|
<env-entry-value/> <!-- Empty value included for JBoss compatibility -->
|
||||||
|
52
pom.xml
52
pom.xml
@@ -2,7 +2,7 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Alfresco Community Repo Parent</name>
|
<name>Alfresco Community Repo Parent</name>
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<acs.version.major>25</acs.version.major>
|
<acs.version.major>25</acs.version.major>
|
||||||
<acs.version.minor>2</acs.version.minor>
|
<acs.version.minor>3</acs.version.minor>
|
||||||
<acs.version.revision>0</acs.version.revision>
|
<acs.version.revision>0</acs.version.revision>
|
||||||
<acs.version.label />
|
<acs.version.label />
|
||||||
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
|
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
|
||||||
@@ -51,19 +51,19 @@
|
|||||||
<dependency.alfresco-server-root.version>7.0.2</dependency.alfresco-server-root.version>
|
<dependency.alfresco-server-root.version>7.0.2</dependency.alfresco-server-root.version>
|
||||||
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
||||||
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
||||||
<dependency.alfresco-transform-core.version>5.1.7</dependency.alfresco-transform-core.version>
|
<dependency.alfresco-transform-core.version>5.2.0</dependency.alfresco-transform-core.version>
|
||||||
<dependency.alfresco-transform-service.version>4.1.7</dependency.alfresco-transform-service.version>
|
<dependency.alfresco-transform-service.version>4.2.0</dependency.alfresco-transform-service.version>
|
||||||
<dependency.alfresco-greenmail.version>7.1</dependency.alfresco-greenmail.version>
|
<dependency.alfresco-greenmail.version>7.1</dependency.alfresco-greenmail.version>
|
||||||
<dependency.acs-event-model.version>1.0.2</dependency.acs-event-model.version>
|
<dependency.acs-event-model.version>1.0.2</dependency.acs-event-model.version>
|
||||||
|
|
||||||
<dependency.aspectj.version>1.9.22.1</dependency.aspectj.version>
|
<dependency.aspectj.version>1.9.22.1</dependency.aspectj.version>
|
||||||
<dependency.spring.version>6.2.2</dependency.spring.version>
|
<dependency.spring.version>6.2.8</dependency.spring.version>
|
||||||
<dependency.spring-security.version>6.3.7</dependency.spring-security.version>
|
<dependency.spring-security.version>6.3.9</dependency.spring-security.version>
|
||||||
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
<dependency.antlr.version>3.5.3</dependency.antlr.version>
|
||||||
<dependency.jackson.version>2.17.2</dependency.jackson.version>
|
<dependency.jackson.version>2.17.2</dependency.jackson.version>
|
||||||
<dependency.cxf.version>4.1.0</dependency.cxf.version>
|
<dependency.cxf.version>4.1.0</dependency.cxf.version>
|
||||||
<dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version>
|
<dependency.opencmis.version>1.0.0-jakarta-1</dependency.opencmis.version>
|
||||||
<dependency.webscripts.version>10.0</dependency.webscripts.version>
|
<dependency.webscripts.version>10.2</dependency.webscripts.version>
|
||||||
<dependency.bouncycastle.version>1.79</dependency.bouncycastle.version>
|
<dependency.bouncycastle.version>1.79</dependency.bouncycastle.version>
|
||||||
<dependency.mockito-core.version>5.14.1</dependency.mockito-core.version>
|
<dependency.mockito-core.version>5.14.1</dependency.mockito-core.version>
|
||||||
<dependency.assertj.version>3.27.3</dependency.assertj.version>
|
<dependency.assertj.version>3.27.3</dependency.assertj.version>
|
||||||
@@ -74,8 +74,9 @@
|
|||||||
<dependency.guava.version>33.3.1-jre</dependency.guava.version>
|
<dependency.guava.version>33.3.1-jre</dependency.guava.version>
|
||||||
<dependency.httpclient.version>4.5.14</dependency.httpclient.version>
|
<dependency.httpclient.version>4.5.14</dependency.httpclient.version>
|
||||||
<dependency.httpcore.version>4.4.16</dependency.httpcore.version>
|
<dependency.httpcore.version>4.4.16</dependency.httpcore.version>
|
||||||
<dependency.httpcomponents-httpclient5.version>5.4.1</dependency.httpcomponents-httpclient5.version>
|
<dependency.httpcomponents-httpclient5.version>5.5</dependency.httpcomponents-httpclient5.version>
|
||||||
<dependency.httpcomponents-httpcore5.version>5.3.3</dependency.httpcomponents-httpcore5.version>
|
<dependency.httpcomponents-httpcore5.version>5.3.4</dependency.httpcomponents-httpcore5.version>
|
||||||
|
<dependency.httpcomponents-httpcore5-h2.version>5.3.4</dependency.httpcomponents-httpcore5-h2.version>
|
||||||
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
|
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
|
||||||
<dependency.xercesImpl.version>2.12.2</dependency.xercesImpl.version>
|
<dependency.xercesImpl.version>2.12.2</dependency.xercesImpl.version>
|
||||||
<dependency.slf4j.version>2.0.16</dependency.slf4j.version>
|
<dependency.slf4j.version>2.0.16</dependency.slf4j.version>
|
||||||
@@ -83,9 +84,9 @@
|
|||||||
<dependency.groovy.version>3.0.23</dependency.groovy.version>
|
<dependency.groovy.version>3.0.23</dependency.groovy.version>
|
||||||
<dependency.tika.version>2.9.2</dependency.tika.version>
|
<dependency.tika.version>2.9.2</dependency.tika.version>
|
||||||
<dependency.truezip.version>7.7.10</dependency.truezip.version>
|
<dependency.truezip.version>7.7.10</dependency.truezip.version>
|
||||||
<dependency.poi.version>5.3.0</dependency.poi.version>
|
<dependency.poi.version>5.4.0</dependency.poi.version>
|
||||||
<dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version>
|
<dependency.jboss.logging.version>3.5.0.Final</dependency.jboss.logging.version>
|
||||||
<dependency.camel.version>4.6.0</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
|
<dependency.camel.version>4.11.0</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies -->
|
||||||
<dependency.netty.version>4.1.118.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
|
<dependency.netty.version>4.1.118.Final</dependency.netty.version> <!-- must be in sync with camels transitive dependencies, e.g.: netty-common -->
|
||||||
<dependency.activemq.version>5.18.6</dependency.activemq.version>
|
<dependency.activemq.version>5.18.6</dependency.activemq.version>
|
||||||
<dependency.apache-compress.version>1.27.1</dependency.apache-compress.version>
|
<dependency.apache-compress.version>1.27.1</dependency.apache-compress.version>
|
||||||
@@ -114,8 +115,8 @@
|
|||||||
<dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version>
|
<dependency.jakarta-json-path.version>2.9.0</dependency.jakarta-json-path.version>
|
||||||
<dependency.json-smart.version>2.5.2</dependency.json-smart.version>
|
<dependency.json-smart.version>2.5.2</dependency.json-smart.version>
|
||||||
<alfresco.googledrive.version>4.1.0</alfresco.googledrive.version>
|
<alfresco.googledrive.version>4.1.0</alfresco.googledrive.version>
|
||||||
<alfresco.aos-module.version>3.2.0</alfresco.aos-module.version>
|
<alfresco.aos-module.version>3.3.0</alfresco.aos-module.version>
|
||||||
<alfresco.api-explorer.version>25.1.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
<alfresco.api-explorer.version>25.2.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||||
|
|
||||||
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
||||||
<license-maven-plugin.version>2.4.0</license-maven-plugin.version>
|
<license-maven-plugin.version>2.4.0</license-maven-plugin.version>
|
||||||
@@ -153,7 +154,7 @@
|
|||||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||||
<tag>HEAD</tag>
|
<tag>25.3.0.1</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
@@ -400,6 +401,11 @@
|
|||||||
<artifactId>httpcore5</artifactId>
|
<artifactId>httpcore5</artifactId>
|
||||||
<version>${dependency.httpcomponents-httpcore5.version}</version>
|
<version>${dependency.httpcomponents-httpcore5.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents.core5</groupId>
|
||||||
|
<artifactId>httpcore5-h2</artifactId>
|
||||||
|
<version>${dependency.httpcomponents-httpcore5-h2.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>commons-logging</artifactId>
|
||||||
@@ -408,7 +414,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
<version>1.9.4</version>
|
<version>1.11.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-codec</groupId>
|
<groupId>commons-codec</groupId>
|
||||||
@@ -438,8 +444,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-fileupload2-jakarta</artifactId>
|
<artifactId>commons-fileupload2-jakarta-servlet6</artifactId>
|
||||||
<version>2.0.0-M1</version>
|
<version>2.0.0-M4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-net</groupId>
|
<groupId>commons-net</groupId>
|
||||||
@@ -822,18 +828,6 @@
|
|||||||
<version>4.13.2</version>
|
<version>4.13.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<version>5.4.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>4.12.0</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.antlr</groupId>
|
<groupId>org.antlr</groupId>
|
||||||
<artifactId>gunit</artifactId>
|
<artifactId>gunit</artifactId>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
<artifactId>alfresco-community-repo</artifactId>
|
<artifactId>alfresco-community-repo</artifactId>
|
||||||
<version>25.2.0.3-SNAPSHOT</version>
|
<version>25.3.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -66,11 +66,6 @@
|
|||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.epam.reportportal</groupId>
|
|
||||||
<artifactId>agent-java-testng</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Remote API
|
* Alfresco Remote API
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2023 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
|
||||||
@@ -46,7 +46,7 @@ import org.alfresco.repo.management.subsystems.ActivateableBean;
|
|||||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
import org.alfresco.repo.security.authentication.external.AdminConsoleAuthenticator;
|
import org.alfresco.repo.security.authentication.external.ExternalUserAuthenticator;
|
||||||
import org.alfresco.repo.security.authentication.external.RemoteUserMapper;
|
import org.alfresco.repo.security.authentication.external.RemoteUserMapper;
|
||||||
import org.alfresco.repo.web.auth.AuthenticationListener;
|
import org.alfresco.repo.web.auth.AuthenticationListener;
|
||||||
import org.alfresco.repo.web.auth.TicketCredentials;
|
import org.alfresco.repo.web.auth.TicketCredentials;
|
||||||
@@ -71,9 +71,11 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
|
|
||||||
protected RemoteUserMapper remoteUserMapper;
|
protected RemoteUserMapper remoteUserMapper;
|
||||||
protected AuthenticationComponent authenticationComponent;
|
protected AuthenticationComponent authenticationComponent;
|
||||||
protected AdminConsoleAuthenticator adminConsoleAuthenticator;
|
protected ExternalUserAuthenticator adminConsoleAuthenticator;
|
||||||
|
protected ExternalUserAuthenticator webScriptsHomeAuthenticator;
|
||||||
|
|
||||||
private boolean alwaysAllowBasicAuthForAdminConsole = true;
|
private boolean alwaysAllowBasicAuthForAdminConsole = true;
|
||||||
|
private boolean alwaysAllowBasicAuthForWebScriptsHome = true;
|
||||||
List<String> adminConsoleScriptFamilies;
|
List<String> adminConsoleScriptFamilies;
|
||||||
long getRemoteUserTimeoutMilliseconds = GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT;
|
long getRemoteUserTimeoutMilliseconds = GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT;
|
||||||
|
|
||||||
@@ -97,6 +99,16 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
this.alwaysAllowBasicAuthForAdminConsole = alwaysAllowBasicAuthForAdminConsole;
|
this.alwaysAllowBasicAuthForAdminConsole = alwaysAllowBasicAuthForAdminConsole;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isAlwaysAllowBasicAuthForWebScriptsHome()
|
||||||
|
{
|
||||||
|
return alwaysAllowBasicAuthForWebScriptsHome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlwaysAllowBasicAuthForWebScriptsHome(boolean alwaysAllowBasicAuthForWebScriptsHome)
|
||||||
|
{
|
||||||
|
this.alwaysAllowBasicAuthForWebScriptsHome = alwaysAllowBasicAuthForWebScriptsHome;
|
||||||
|
}
|
||||||
|
|
||||||
public List<String> getAdminConsoleScriptFamilies()
|
public List<String> getAdminConsoleScriptFamilies()
|
||||||
{
|
{
|
||||||
return adminConsoleScriptFamilies;
|
return adminConsoleScriptFamilies;
|
||||||
@@ -118,11 +130,17 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setAdminConsoleAuthenticator(
|
public void setAdminConsoleAuthenticator(
|
||||||
AdminConsoleAuthenticator adminConsoleAuthenticator)
|
ExternalUserAuthenticator adminConsoleAuthenticator)
|
||||||
{
|
{
|
||||||
this.adminConsoleAuthenticator = adminConsoleAuthenticator;
|
this.adminConsoleAuthenticator = adminConsoleAuthenticator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setWebScriptsHomeAuthenticator(
|
||||||
|
ExternalUserAuthenticator webScriptsHomeAuthenticator)
|
||||||
|
{
|
||||||
|
this.webScriptsHomeAuthenticator = webScriptsHomeAuthenticator;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Authenticator create(WebScriptServletRequest req, WebScriptServletResponse res)
|
public Authenticator create(WebScriptServletRequest req, WebScriptServletResponse res)
|
||||||
{
|
{
|
||||||
@@ -136,6 +154,8 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
*/
|
*/
|
||||||
public class RemoteUserAuthenticator extends BasicHttpAuthenticator
|
public class RemoteUserAuthenticator extends BasicHttpAuthenticator
|
||||||
{
|
{
|
||||||
|
private static final String WEB_SCRIPTS_BASE_PATH = "org/springframework/extensions/webscripts";
|
||||||
|
|
||||||
public RemoteUserAuthenticator(WebScriptServletRequest req, WebScriptServletResponse res, AuthenticationListener listener)
|
public RemoteUserAuthenticator(WebScriptServletRequest req, WebScriptServletResponse res, AuthenticationListener listener)
|
||||||
{
|
{
|
||||||
super(req, res, listener);
|
super(req, res, listener);
|
||||||
@@ -156,24 +176,47 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (servletReq.getServiceMatch() != null &&
|
if (servletReq.getServiceMatch() != null &&
|
||||||
isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
|
isAdminConsole(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
|
||||||
{
|
{
|
||||||
userId = getAdminConsoleUser();
|
userId = getAdminConsoleUser();
|
||||||
}
|
}
|
||||||
|
else if (servletReq.getServiceMatch() != null &&
|
||||||
|
isWebScriptsHome(servletReq.getServiceMatch().getWebScript()) && isWebScriptsHomeAuthenticatorActive())
|
||||||
|
{
|
||||||
|
userId = getWebScriptsHomeUser();
|
||||||
|
}
|
||||||
|
|
||||||
if (userId == null)
|
if (userId == null)
|
||||||
{
|
{
|
||||||
if (isAlwaysAllowBasicAuthForAdminConsole())
|
if (isAlwaysAllowBasicAuthForAdminConsole())
|
||||||
{
|
{
|
||||||
final boolean useTimeoutForAdminAccessingAdminConsole = shouldUseTimeoutForAdminAccessingAdminConsole(required, isGuest);
|
boolean shouldUseTimeout = shouldUseTimeoutForAdminAccessingAdminConsole(required, isGuest);
|
||||||
|
|
||||||
if (useTimeoutForAdminAccessingAdminConsole && isBasicAuthHeaderPresentForAdmin())
|
if (shouldUseTimeout && isBasicAuthHeaderPresentForAdmin())
|
||||||
{
|
{
|
||||||
return callBasicAuthForAdminConsoleAccess(required, isGuest);
|
return callBasicAuthForAdminConsoleOrWebScriptsHomeAccess(required, isGuest);
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userId = getRemoteUserWithTimeout(useTimeoutForAdminAccessingAdminConsole);
|
userId = getRemoteUserWithTimeout(shouldUseTimeout);
|
||||||
|
}
|
||||||
|
catch (AuthenticationTimeoutException e)
|
||||||
|
{
|
||||||
|
// return basic auth challenge
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (isAlwaysAllowBasicAuthForWebScriptsHome())
|
||||||
|
{
|
||||||
|
boolean shouldUseTimeout = shouldUseTimeoutForAdminAccessingWebScriptsHome(required, isGuest);
|
||||||
|
|
||||||
|
if (shouldUseTimeout && isBasicAuthHeaderPresentForAdmin())
|
||||||
|
{
|
||||||
|
return callBasicAuthForAdminConsoleOrWebScriptsHomeAccess(required, isGuest);
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
userId = getRemoteUserWithTimeout(shouldUseTimeout);
|
||||||
}
|
}
|
||||||
catch (AuthenticationTimeoutException e)
|
catch (AuthenticationTimeoutException e)
|
||||||
{
|
{
|
||||||
@@ -252,38 +295,63 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
authenticated = super.authenticate(required, isGuest);
|
authenticated = super.authenticate(required, isGuest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!authenticated && servletReq.getServiceMatch() != null &&
|
if (!authenticated && servletReq.getServiceMatch() != null)
|
||||||
isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript()) && isAdminConsoleAuthenticatorActive())
|
|
||||||
{
|
{
|
||||||
adminConsoleAuthenticator.requestAuthentication(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
|
WebScript webScript = servletReq.getServiceMatch().getWebScript();
|
||||||
|
|
||||||
|
if (isAdminConsole(webScript) && isAdminConsoleAuthenticatorActive())
|
||||||
|
{
|
||||||
|
adminConsoleAuthenticator.requestAuthentication(
|
||||||
|
this.servletReq.getHttpServletRequest(),
|
||||||
|
this.servletRes.getHttpServletResponse());
|
||||||
|
}
|
||||||
|
else if (isWebScriptsHome(webScript)
|
||||||
|
&& isWebScriptsHomeAuthenticatorActive())
|
||||||
|
{
|
||||||
|
webScriptsHomeAuthenticator.requestAuthentication(
|
||||||
|
this.servletReq.getHttpServletRequest(),
|
||||||
|
this.servletRes.getHttpServletResponse());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return authenticated;
|
return authenticated;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean callBasicAuthForAdminConsoleAccess(RequiredAuthentication required, boolean isGuest)
|
private boolean callBasicAuthForAdminConsoleOrWebScriptsHomeAccess(RequiredAuthentication required, boolean isGuest)
|
||||||
{
|
{
|
||||||
// return REST call, after a timeout/basic auth challenge
|
// return REST call, after a timeout/basic auth challenge
|
||||||
if (LOGGER.isTraceEnabled())
|
if (LOGGER.isTraceEnabled())
|
||||||
{
|
{
|
||||||
LOGGER.trace("An Admin Console request has come in with Basic Auth headers present for an admin user.");
|
LOGGER.trace("An Admin Console or WebScripts Home request has come in with Basic Auth headers present for an admin user.");
|
||||||
}
|
}
|
||||||
// In order to prompt for another password, in case it was not entered correctly,
|
// In order to prompt for another password, in case it was not entered correctly,
|
||||||
// the output of this method should be returned by the calling "authenticate" method;
|
// the output of this method should be returned by the calling "authenticate" method;
|
||||||
// This would also mean, that once the admin basic auth header is present,
|
// This would also mean, that once the admin basic auth header is present,
|
||||||
// the authentication chain will not be used for the admin console access
|
// the authentication chain will not be used for access
|
||||||
return super.authenticate(required, isGuest);
|
return super.authenticate(required, isGuest);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldUseTimeoutForAdminAccessingAdminConsole(RequiredAuthentication required, boolean isGuest)
|
private boolean shouldUseTimeoutForAdminAccessingAdminConsole(RequiredAuthentication required, boolean isGuest)
|
||||||
{
|
{
|
||||||
boolean useTimeoutForAdminAccessingAdminConsole = RequiredAuthentication.admin.equals(required) && !isGuest &&
|
boolean adminConsoleTimeout = RequiredAuthentication.admin.equals(required) && !isGuest &&
|
||||||
servletReq.getServiceMatch() != null && isAdminConsoleWebScript(servletReq.getServiceMatch().getWebScript());
|
servletReq.getServiceMatch() != null && isAdminConsole(servletReq.getServiceMatch().getWebScript());
|
||||||
|
|
||||||
if (LOGGER.isTraceEnabled())
|
if (LOGGER.isTraceEnabled())
|
||||||
{
|
{
|
||||||
LOGGER.trace("Should ensure that the admins can login with basic auth: " + useTimeoutForAdminAccessingAdminConsole);
|
LOGGER.trace("Should ensure that the admins can login with basic auth: " + adminConsoleTimeout);
|
||||||
}
|
}
|
||||||
return useTimeoutForAdminAccessingAdminConsole;
|
return adminConsoleTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean shouldUseTimeoutForAdminAccessingWebScriptsHome(RequiredAuthentication required, boolean isGuest)
|
||||||
|
{
|
||||||
|
boolean adminWebScriptsHomeTimeout = RequiredAuthentication.admin.equals(required) && !isGuest &&
|
||||||
|
servletReq.getServiceMatch() != null && isWebScriptsHome(servletReq.getServiceMatch().getWebScript());
|
||||||
|
|
||||||
|
if (LOGGER.isTraceEnabled())
|
||||||
|
{
|
||||||
|
LOGGER.trace("Should ensure that the admins can login with basic auth: " + adminWebScriptsHomeTimeout);
|
||||||
|
}
|
||||||
|
return adminWebScriptsHomeTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isRemoteUserMapperActive()
|
private boolean isRemoteUserMapperActive()
|
||||||
@@ -296,7 +364,12 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
return adminConsoleAuthenticator != null && (!(adminConsoleAuthenticator instanceof ActivateableBean) || ((ActivateableBean) adminConsoleAuthenticator).isActive());
|
return adminConsoleAuthenticator != null && (!(adminConsoleAuthenticator instanceof ActivateableBean) || ((ActivateableBean) adminConsoleAuthenticator).isActive());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isAdminConsoleWebScript(WebScript webScript)
|
private boolean isWebScriptsHomeAuthenticatorActive()
|
||||||
|
{
|
||||||
|
return webScriptsHomeAuthenticator != null && (!(webScriptsHomeAuthenticator instanceof ActivateableBean) || ((ActivateableBean) webScriptsHomeAuthenticator).isActive());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean isAdminConsole(WebScript webScript)
|
||||||
{
|
{
|
||||||
if (webScript == null || adminConsoleScriptFamilies == null || webScript.getDescription() == null
|
if (webScript == null || adminConsoleScriptFamilies == null || webScript.getDescription() == null
|
||||||
|| webScript.getDescription().getFamilys() == null)
|
|| webScript.getDescription().getFamilys() == null)
|
||||||
@@ -310,7 +383,7 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
}
|
}
|
||||||
|
|
||||||
// intersect the "family" sets defined
|
// intersect the "family" sets defined
|
||||||
Set<String> families = new HashSet<String>(webScript.getDescription().getFamilys());
|
Set<String> families = new HashSet<>(webScript.getDescription().getFamilys());
|
||||||
families.retainAll(adminConsoleScriptFamilies);
|
families.retainAll(adminConsoleScriptFamilies);
|
||||||
final boolean isAdminConsole = !families.isEmpty();
|
final boolean isAdminConsole = !families.isEmpty();
|
||||||
|
|
||||||
@@ -322,6 +395,23 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
return isAdminConsole;
|
return isAdminConsole;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean isWebScriptsHome(WebScript webScript)
|
||||||
|
{
|
||||||
|
if (webScript == null || webScript.toString() == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean isWebScriptsHome = webScript.toString().startsWith(WEB_SCRIPTS_BASE_PATH);
|
||||||
|
|
||||||
|
if (LOGGER.isTraceEnabled() && isWebScriptsHome)
|
||||||
|
{
|
||||||
|
LOGGER.trace("Detected a WebScripts Home webscript: " + webScript);
|
||||||
|
}
|
||||||
|
|
||||||
|
return isWebScriptsHome;
|
||||||
|
}
|
||||||
|
|
||||||
protected String getRemoteUserWithTimeout(boolean useTimeout) throws AuthenticationTimeoutException
|
protected String getRemoteUserWithTimeout(boolean useTimeout) throws AuthenticationTimeoutException
|
||||||
{
|
{
|
||||||
if (!useTimeout)
|
if (!useTimeout)
|
||||||
@@ -417,7 +507,21 @@ public class RemoteUserAuthenticatorFactory extends BasicHttpAuthenticatorFactor
|
|||||||
|
|
||||||
if (isRemoteUserMapperActive())
|
if (isRemoteUserMapperActive())
|
||||||
{
|
{
|
||||||
userId = adminConsoleAuthenticator.getAdminConsoleUser(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
|
userId = adminConsoleAuthenticator.getUserId(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
|
||||||
|
}
|
||||||
|
|
||||||
|
logRemoteUserID(userId);
|
||||||
|
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getWebScriptsHomeUser()
|
||||||
|
{
|
||||||
|
String userId = null;
|
||||||
|
|
||||||
|
if (isRemoteUserMapperActive())
|
||||||
|
{
|
||||||
|
userId = webScriptsHomeAuthenticator.getUserId(this.servletReq.getHttpServletRequest(), this.servletRes.getHttpServletResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
logRemoteUserID(userId);
|
logRemoteUserID(userId);
|
||||||
|
@@ -30,7 +30,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
import org.apache.commons.fileupload2.core.FileItemInput;
|
import org.apache.commons.fileupload2.core.FileItemInput;
|
||||||
import org.apache.commons.fileupload2.core.FileItemInputIterator;
|
import org.apache.commons.fileupload2.core.FileItemInputIterator;
|
||||||
import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload;
|
import org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.extensions.webscripts.Status;
|
import org.springframework.extensions.webscripts.Status;
|
||||||
|
@@ -31,7 +31,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
import org.apache.commons.fileupload2.core.FileItemInput;
|
import org.apache.commons.fileupload2.core.FileItemInput;
|
||||||
import org.apache.commons.fileupload2.core.FileItemInputIterator;
|
import org.apache.commons.fileupload2.core.FileItemInputIterator;
|
||||||
import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload;
|
import org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.extensions.webscripts.Status;
|
import org.springframework.extensions.webscripts.Status;
|
||||||
|
@@ -712,7 +712,7 @@ public class PeopleImpl implements People
|
|||||||
Boolean isEnabled = person.isEnabled();
|
Boolean isEnabled = person.isEnabled();
|
||||||
if (isEnabled != null)
|
if (isEnabled != null)
|
||||||
{
|
{
|
||||||
if (isAdminAuthority(personIdToUpdate))
|
if (!isEnabled && isAdminAuthority(personIdToUpdate))
|
||||||
{
|
{
|
||||||
throw new PermissionDeniedException("Admin authority cannot be disabled.");
|
throw new PermissionDeniedException("Admin authority cannot be disabled.");
|
||||||
}
|
}
|
||||||
|
@@ -2,23 +2,23 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Remote API
|
* Alfresco Remote API
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
* the paid license agreement will prevail. Otherwise, the software is
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
* provided under the following open source license terms:
|
* provided under the following open source license terms:
|
||||||
*
|
*
|
||||||
* Alfresco is free software: you can redistribute it and/or modify
|
* 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
|
* 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
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Alfresco is distributed in the hope that it will be useful,
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Lesser General Public License for more details.
|
* GNU Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* #L%
|
* #L%
|
||||||
@@ -38,14 +38,19 @@ import java.util.Collections;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.query.PagingRequest;
|
import org.alfresco.query.PagingRequest;
|
||||||
|
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||||
import org.alfresco.repo.site.SiteModel;
|
import org.alfresco.repo.site.SiteModel;
|
||||||
import org.alfresco.rest.api.Nodes;
|
import org.alfresco.rest.api.Nodes;
|
||||||
import org.alfresco.rest.api.People;
|
import org.alfresco.rest.api.People;
|
||||||
@@ -89,6 +94,7 @@ import org.alfresco.util.SearchLanguageConversion;
|
|||||||
*/
|
*/
|
||||||
public class QueriesImpl implements Queries, InitializingBean
|
public class QueriesImpl implements Queries, InitializingBean
|
||||||
{
|
{
|
||||||
|
private static final Log LOGGER = LogFactory.getLog(QueriesImpl.class);
|
||||||
private final static Map<String, QName> NODE_SORT_PARAMS_TO_QNAMES = sortParamsToQNames(
|
private final static Map<String, QName> NODE_SORT_PARAMS_TO_QNAMES = sortParamsToQNames(
|
||||||
PARAM_NAME, ContentModel.PROP_NAME,
|
PARAM_NAME, ContentModel.PROP_NAME,
|
||||||
PARAM_CREATEDAT, ContentModel.PROP_CREATED,
|
PARAM_CREATEDAT, ContentModel.PROP_CREATED,
|
||||||
@@ -247,7 +253,7 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
{
|
{
|
||||||
// first request for this namespace prefix, get and cache result
|
// first request for this namespace prefix, get and cache result
|
||||||
Collection<String> prefixes = namespaceService.getPrefixes(qname.getNamespaceURI());
|
Collection<String> prefixes = namespaceService.getPrefixes(qname.getNamespaceURI());
|
||||||
prefix = prefixes.size() != 0 ? prefixes.iterator().next() : "";
|
prefix = !prefixes.isEmpty() ? prefixes.iterator().next() : "";
|
||||||
cache.put(qname.getNamespaceURI(), prefix);
|
cache.put(qname.getNamespaceURI(), prefix);
|
||||||
}
|
}
|
||||||
buf.append('/').append(prefix).append(':').append(ISO9075.encode(qname.getLocalName()));
|
buf.append('/').append(prefix).append(':').append(ISO9075.encode(qname.getLocalName()));
|
||||||
@@ -261,12 +267,6 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<Node> newList(int capacity)
|
|
||||||
{
|
|
||||||
return new ArrayList<Node>(capacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Node convert(NodeRef nodeRef, List<String> includeParam)
|
protected Node convert(NodeRef nodeRef, List<String> includeParam)
|
||||||
{
|
{
|
||||||
@@ -303,18 +303,11 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
query.append("*\")");
|
query.append("*\")");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<Person> newList(int capacity)
|
|
||||||
{
|
|
||||||
return new ArrayList<Person>(capacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Person convert(NodeRef nodeRef, List<String> includeParam)
|
protected Person convert(NodeRef nodeRef, List<String> includeParam)
|
||||||
{
|
{
|
||||||
String personId = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
|
String personId = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
|
||||||
Person person = people.getPerson(personId);
|
return people.getPerson(personId);
|
||||||
return person;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Do the sort in the query on day. A comment in the code for the V0 API used for live people
|
// TODO Do the sort in the query on day. A comment in the code for the V0 API used for live people
|
||||||
@@ -341,28 +334,18 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
query.append("*\")");
|
query.append("*\")");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected List<Site> newList(int capacity)
|
|
||||||
{
|
|
||||||
return new ArrayList<>(capacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Site convert(NodeRef nodeRef, List<String> includeParam)
|
protected Site convert(NodeRef nodeRef, List<String> includeParam)
|
||||||
{
|
{
|
||||||
return getSite(siteService.getSite(nodeRef), true);
|
return getSite(siteService.getSite(nodeRef));
|
||||||
}
|
}
|
||||||
|
|
||||||
// note: see also Sites.getSite
|
// note: see also Sites.getSite
|
||||||
private Site getSite(SiteInfo siteInfo, boolean includeRole)
|
private Site getSite(SiteInfo siteInfo)
|
||||||
{
|
{
|
||||||
// set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url)
|
// set the site id to the short name (to deal with case sensitivity issues with using the siteId from the url)
|
||||||
String siteId = siteInfo.getShortName();
|
String siteId = siteInfo.getShortName();
|
||||||
String role = null;
|
String role = sites.getSiteRole(siteId);
|
||||||
if (includeRole)
|
|
||||||
{
|
|
||||||
role = sites.getSiteRole(siteId);
|
|
||||||
}
|
|
||||||
return new Site(siteInfo, role);
|
return new Site(siteInfo, role);
|
||||||
}
|
}
|
||||||
}.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", POST_QUERY_SORT, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true));
|
}.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", POST_QUERY_SORT, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true));
|
||||||
@@ -412,34 +395,38 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResultSet queryResults = null;
|
ResultSet queryResults = null;
|
||||||
List<T> collection = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
queryResults = searchService.query(sp);
|
queryResults = searchService.query(sp);
|
||||||
|
|
||||||
List<NodeRef> nodeRefs = queryResults.getNodeRefs();
|
List<NodeRef> nodeRefs = queryResults.getNodeRefs();
|
||||||
|
Map<NodeRef, T> collection = new LinkedHashMap<>(nodeRefs.size());
|
||||||
if (sort == POST_QUERY_SORT)
|
|
||||||
{
|
|
||||||
nodeRefs = postQuerySort(parameters, sortParamsToQNames, defaultSortCols, nodeRefs);
|
|
||||||
}
|
|
||||||
|
|
||||||
collection = newList(nodeRefs.size());
|
|
||||||
List<String> includeParam = parameters.getInclude();
|
List<String> includeParam = parameters.getInclude();
|
||||||
|
|
||||||
for (NodeRef nodeRef : nodeRefs)
|
for (NodeRef nodeRef : nodeRefs)
|
||||||
{
|
{
|
||||||
T t = convert(nodeRef, includeParam);
|
try
|
||||||
collection.add(t);
|
{
|
||||||
|
T t = convert(nodeRef, includeParam);
|
||||||
|
collection.put(nodeRef, t);
|
||||||
|
}
|
||||||
|
catch (AccessDeniedException ade)
|
||||||
|
{
|
||||||
|
LOGGER.debug("Ignoring search result for nodeRef " + nodeRef + " due to access denied exception", ade);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sort == POST_QUERY_SORT)
|
if (sort == POST_QUERY_SORT)
|
||||||
{
|
{
|
||||||
return listPage(collection, paging);
|
List<T> postQuerySortedCollection = postQuerySort(parameters, sortParamsToQNames, defaultSortCols, collection.keySet())
|
||||||
|
.stream()
|
||||||
|
.map(collection::get)
|
||||||
|
.toList();
|
||||||
|
return listPage(postQuerySortedCollection, paging);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return CollectionWithPagingInfo.asPaged(paging, collection, queryResults.hasMore(), Long.valueOf(queryResults.getNumberFound()).intValue());
|
return CollectionWithPagingInfo.asPaged(paging, collection.values(), queryResults.hasMore(), Long.valueOf(queryResults.getNumberFound()).intValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -464,15 +451,6 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
*/
|
*/
|
||||||
protected abstract void buildQuery(StringBuilder query, String term, SearchParameters sp, String queryTemplateName);
|
protected abstract void buildQuery(StringBuilder query, String term, SearchParameters sp, String queryTemplateName);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of the correct type.
|
|
||||||
*
|
|
||||||
* @param capacity
|
|
||||||
* of the list
|
|
||||||
* @return a new list.
|
|
||||||
*/
|
|
||||||
protected abstract List<T> newList(int capacity);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a nodeRef into the an object of the required type.
|
* Converts a nodeRef into the an object of the required type.
|
||||||
*
|
*
|
||||||
@@ -551,7 +529,7 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
private List<SortColumn> getSorting(Parameters parameters, List<SortColumn> defaultSortCols)
|
private List<SortColumn> getSorting(Parameters parameters, List<SortColumn> defaultSortCols)
|
||||||
{
|
{
|
||||||
List<SortColumn> sortCols = parameters.getSorting();
|
List<SortColumn> sortCols = parameters.getSorting();
|
||||||
if (sortCols == null || sortCols.size() == 0)
|
if (sortCols == null || sortCols.isEmpty())
|
||||||
{
|
{
|
||||||
sortCols = defaultSortCols == null ? Collections.emptyList() : defaultSortCols;
|
sortCols = defaultSortCols == null ? Collections.emptyList() : defaultSortCols;
|
||||||
}
|
}
|
||||||
@@ -559,62 +537,66 @@ public class QueriesImpl implements Queries, InitializingBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected List<NodeRef> postQuerySort(Parameters parameters, Map<String, QName> sortParamsToQNames,
|
protected List<NodeRef> postQuerySort(Parameters parameters, Map<String, QName> sortParamsToQNames,
|
||||||
List<SortColumn> defaultSortCols, List<NodeRef> nodeRefs)
|
List<SortColumn> defaultSortCols, Set<NodeRef> unsortedNodeRefs)
|
||||||
{
|
{
|
||||||
final List<SortColumn> sortCols = getSorting(parameters, defaultSortCols);
|
final List<SortColumn> sortCols = getSorting(parameters, defaultSortCols);
|
||||||
int sortColCount = sortCols.size();
|
int sortColCount = sortCols.size();
|
||||||
if (sortColCount > 0)
|
|
||||||
{
|
|
||||||
// make copy of nodeRefs because it can be unmodifiable list.
|
|
||||||
nodeRefs = new ArrayList<NodeRef>(nodeRefs);
|
|
||||||
|
|
||||||
List<QName> sortPropQNames = new ArrayList<>(sortColCount);
|
if (sortColCount == 0)
|
||||||
for (SortColumn sortCol : sortCols)
|
{
|
||||||
|
return new ArrayList<>(unsortedNodeRefs);
|
||||||
|
}
|
||||||
|
|
||||||
|
// make copy of nodeRefs because it can be unmodifiable list.
|
||||||
|
List<NodeRef> sortedNodeRefs = new ArrayList<>(unsortedNodeRefs);
|
||||||
|
|
||||||
|
List<QName> sortPropQNames = new ArrayList<>(sortColCount);
|
||||||
|
for (SortColumn sortCol : sortCols)
|
||||||
|
{
|
||||||
|
QName sortPropQName = sortParamsToQNames.get(sortCol.column);
|
||||||
|
if (sortPropQName == null)
|
||||||
{
|
{
|
||||||
QName sortPropQName = sortParamsToQNames.get(sortCol.column);
|
throw new InvalidArgumentException("Invalid sort field: " + sortCol.column);
|
||||||
if (sortPropQName == null)
|
}
|
||||||
|
sortPropQNames.add(sortPropQName);
|
||||||
|
}
|
||||||
|
|
||||||
|
final Collator col = AlfrescoCollator.getInstance(I18NUtil.getLocale());
|
||||||
|
Collections.sort(sortedNodeRefs, new Comparator<NodeRef>() {
|
||||||
|
@Override
|
||||||
|
public int compare(NodeRef n1, NodeRef n2)
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
for (int i = 0; i < sortCols.size(); i++)
|
||||||
{
|
{
|
||||||
throw new InvalidArgumentException("Invalid sort field: " + sortCol.column);
|
SortColumn sortCol = sortCols.get(i);
|
||||||
|
QName sortPropQName = sortPropQNames.get(i);
|
||||||
|
|
||||||
|
Serializable p1 = getProperty(n1, sortPropQName);
|
||||||
|
Serializable p2 = getProperty(n2, sortPropQName);
|
||||||
|
|
||||||
|
result = ((p1 instanceof Long) && (p2 instanceof Long)
|
||||||
|
? Long.compare((Long) p1, (Long) p2)
|
||||||
|
: col.compare(p1.toString(), p2.toString()))
|
||||||
|
* (sortCol.asc ? 1 : -1);
|
||||||
|
|
||||||
|
if (result != 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sortPropQNames.add(sortPropQName);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Collator col = AlfrescoCollator.getInstance(I18NUtil.getLocale());
|
private Serializable getProperty(NodeRef nodeRef, QName sortPropQName)
|
||||||
Collections.sort(nodeRefs, new Comparator<NodeRef>() {
|
{
|
||||||
@Override
|
Serializable result = nodeService.getProperty(nodeRef, sortPropQName);
|
||||||
public int compare(NodeRef n1, NodeRef n2)
|
return result == null ? "" : result;
|
||||||
{
|
}
|
||||||
int result = 0;
|
|
||||||
for (int i = 0; i < sortCols.size(); i++)
|
|
||||||
{
|
|
||||||
SortColumn sortCol = sortCols.get(i);
|
|
||||||
QName sortPropQName = sortPropQNames.get(i);
|
|
||||||
|
|
||||||
Serializable p1 = getProperty(n1, sortPropQName);
|
});
|
||||||
Serializable p2 = getProperty(n2, sortPropQName);
|
|
||||||
|
|
||||||
result = ((p1 instanceof Long) && (p2 instanceof Long)
|
return sortedNodeRefs;
|
||||||
? Long.compare((Long) p1, (Long) p2)
|
|
||||||
: col.compare(p1.toString(), p2.toString()))
|
|
||||||
* (sortCol.asc ? 1 : -1);
|
|
||||||
|
|
||||||
if (result != 0)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Serializable getProperty(NodeRef nodeRef, QName sortPropQName)
|
|
||||||
{
|
|
||||||
Serializable result = nodeService.getProperty(nodeRef, sortPropQName);
|
|
||||||
return result == null ? "" : result;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return nodeRefs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// note: see also AbstractNodeRelation
|
// note: see also AbstractNodeRelation
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Remote API
|
* Alfresco Remote API
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2022 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
|
||||||
@@ -75,6 +75,7 @@ public class ActionNodeParameterValidator implements ActionValidator
|
|||||||
static final String NO_PROPER_PERMISSIONS_FOR_NODE = "No proper permissions for node: ";
|
static final String NO_PROPER_PERMISSIONS_FOR_NODE = "No proper permissions for node: ";
|
||||||
static final String NOT_A_CATEGORY = "Node is not a category ";
|
static final String NOT_A_CATEGORY = "Node is not a category ";
|
||||||
static final String NOT_A_FOLDER = "Node is not a folder ";
|
static final String NOT_A_FOLDER = "Node is not a folder ";
|
||||||
|
static final String NO_LONGER_EXISTS = "%s having Id: %s no longer exists. Please update your rule definition.";
|
||||||
|
|
||||||
private final Actions actions;
|
private final Actions actions;
|
||||||
private final NamespaceService namespaceService;
|
private final NamespaceService namespaceService;
|
||||||
@@ -132,7 +133,15 @@ public class ActionNodeParameterValidator implements ActionValidator
|
|||||||
.filter(pd -> action.getParams().containsKey(pd.getName()))
|
.filter(pd -> action.getParams().containsKey(pd.getName()))
|
||||||
.forEach(p -> {
|
.forEach(p -> {
|
||||||
final String nodeId = Objects.toString(action.getParams().get(p.getName()), Strings.EMPTY);
|
final String nodeId = Objects.toString(action.getParams().get(p.getName()), Strings.EMPTY);
|
||||||
final NodeRef nodeRef = nodes.validateNode(nodeId);
|
NodeRef nodeRef;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
nodeRef = nodes.validateNode(nodeId);
|
||||||
|
}
|
||||||
|
catch (EntityNotFoundException e)
|
||||||
|
{
|
||||||
|
throw new EntityNotFoundException(String.format(NO_LONGER_EXISTS, p.getDisplayLabel(), nodeId), e);
|
||||||
|
}
|
||||||
validatePermission(action.getActionDefinitionId(), p.getName(), nodeRef);
|
validatePermission(action.getActionDefinitionId(), p.getName(), nodeRef);
|
||||||
validateType(action.getActionDefinitionId(), nodeRef);
|
validateType(action.getActionDefinitionId(), nodeRef);
|
||||||
});
|
});
|
||||||
@@ -169,4 +178,5 @@ public class ActionNodeParameterValidator implements ActionValidator
|
|||||||
throw new InvalidArgumentException(NOT_A_CATEGORY + nodeRef.getId());
|
throw new InvalidArgumentException(NOT_A_CATEGORY + nodeRef.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Admin Console
|
admin-console.header=Admin Console
|
||||||
admin-console.help=Help
|
admin-console.help=Help
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Successfully saved values.
|
admin-console.success=Successfully saved values.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Konzole pro spr\u00e1vce
|
admin-console.header=Konzole pro spr\u00e1vce
|
||||||
admin-console.help=N\u00e1pov\u011bda
|
admin-console.help=N\u00e1pov\u011bda
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Hodnoty byly \u00fasp\u011b\u0161n\u011b ulo\u017eeny.
|
admin-console.success=Hodnoty byly \u00fasp\u011b\u0161n\u011b ulo\u017eeny.
|
||||||
|
|
||||||
admin-console.host=Hostitel
|
admin-console.host=Hostitel
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Administrationskonsol
|
admin-console.header=Administrationskonsol
|
||||||
admin-console.help=Hj\u00e6lp
|
admin-console.help=Hj\u00e6lp
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=V\u00e6rdierne blev gemt.
|
admin-console.success=V\u00e6rdierne blev gemt.
|
||||||
|
|
||||||
admin-console.host=V\u00e6rt
|
admin-console.host=V\u00e6rt
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Administratorkonsole
|
admin-console.header=Administratorkonsole
|
||||||
admin-console.help=Hilfe
|
admin-console.help=Hilfe
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Erfolgreich gespeicherte Werte.
|
admin-console.success=Erfolgreich gespeicherte Werte.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Consola de administraci\u00f3n
|
admin-console.header=Consola de administraci\u00f3n
|
||||||
admin-console.help=Ayuda
|
admin-console.help=Ayuda
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Valores guardados correctamente.
|
admin-console.success=Valores guardados correctamente.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Hallintakonsoli
|
admin-console.header=Hallintakonsoli
|
||||||
admin-console.help=Ohje
|
admin-console.help=Ohje
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Arvot tallennettiin.
|
admin-console.success=Arvot tallennettiin.
|
||||||
|
|
||||||
admin-console.host=Is\u00e4nt\u00e4
|
admin-console.host=Is\u00e4nt\u00e4
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Console d'administration
|
admin-console.header=Console d'administration
|
||||||
admin-console.help=Aide
|
admin-console.help=Aide
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Les valeurs ont bien \u00e9t\u00e9 enregistr\u00e9es.
|
admin-console.success=Les valeurs ont bien \u00e9t\u00e9 enregistr\u00e9es.
|
||||||
|
|
||||||
admin-console.host=H\u00f4te
|
admin-console.host=H\u00f4te
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Console di amministrazione
|
admin-console.header=Console di amministrazione
|
||||||
admin-console.help=Aiuto
|
admin-console.help=Aiuto
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=I valori sono stati salvati.
|
admin-console.success=I valori sono stati salvati.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb
|
admin-console.header=\u7ba1\u7406\u30b3\u30f3\u30bd\u30fc\u30eb
|
||||||
admin-console.help=\u30d8\u30eb\u30d7
|
admin-console.help=\u30d8\u30eb\u30d7
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=\u5024\u3092\u6b63\u5e38\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002
|
admin-console.success=\u5024\u3092\u6b63\u5e38\u306b\u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002
|
||||||
|
|
||||||
admin-console.host=\u30db\u30b9\u30c8
|
admin-console.host=\u30db\u30b9\u30c8
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Admin-konsoll
|
admin-console.header=Admin-konsoll
|
||||||
admin-console.help=Hjelp
|
admin-console.help=Hjelp
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Verdier som ble lagret.
|
admin-console.success=Verdier som ble lagret.
|
||||||
|
|
||||||
admin-console.host=Vert
|
admin-console.host=Vert
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Beheerconsole
|
admin-console.header=Beheerconsole
|
||||||
admin-console.help=Help
|
admin-console.help=Help
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Waarden zijn opgeslagen.
|
admin-console.success=Waarden zijn opgeslagen.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Konsola administracyjna
|
admin-console.header=Konsola administracyjna
|
||||||
admin-console.help=Pomoc
|
admin-console.help=Pomoc
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Warto\u015bci zosta\u0142y zapisane pomy\u015blnie.
|
admin-console.success=Warto\u015bci zosta\u0142y zapisane pomy\u015blnie.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=Console de administra\u00e7\u00e3o
|
admin-console.header=Console de administra\u00e7\u00e3o
|
||||||
admin-console.help=Ajuda
|
admin-console.help=Ajuda
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=Valores salvos com sucesso.
|
admin-console.success=Valores salvos com sucesso.
|
||||||
|
|
||||||
admin-console.host=Host
|
admin-console.host=Host
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# I18N messages for the Repository Admin Console
|
# I18N messages for the Repository Admin Console
|
||||||
admin-console.header=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430
|
admin-console.header=\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430
|
||||||
admin-console.help=\u0421\u043f\u0440\u0430\u0432\u043a\u0430
|
admin-console.help=\u0421\u043f\u0440\u0430\u0432\u043a\u0430
|
||||||
admin-console.help-link=https://support.hyland.com/p/alfresco
|
admin-console.help-link-topic=qvs1720602310678
|
||||||
admin-console.success=\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.
|
admin-console.success=\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.
|
||||||
|
|
||||||
admin-console.host=\u0425\u043e\u0441\u0442
|
admin-console.host=\u0425\u043e\u0441\u0442
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user