Compare commits

...

30 Commits

Author SHA1 Message Date
alfresco-build
4e764a3106 [maven-release-plugin][skip ci] prepare release 21.10 2023-07-28 15:03:22 +00:00
Tom Page
bbb668b446 [force 7.4.1-A2] ACS-5696 Release 7.4.1-A2. 2023-07-28 15:56:59 +01:00
alfresco-build
c9b9a9b239 [maven-release-plugin][skip ci] prepare for next development iteration 2023-07-28 12:55:37 +00:00
alfresco-build
01fb7f45a3 [maven-release-plugin][skip ci] prepare release 21.9 2023-07-28 12:55:33 +00:00
Tom Page
41c4b34d8d ACS-5698 Allow specifying version when performing force release. (#2089)
(cherry picked from commit 0b6b405c5f)
2023-07-26 15:53:01 +01:00
alfresco-build
36bf081b59 [maven-release-plugin][skip ci] prepare for next development iteration 2023-07-26 13:16:58 +00:00
alfresco-build
2a5892de78 [maven-release-plugin][skip ci] prepare release 21.8 2023-07-26 13:16:55 +00:00
Tom Page
d302606318 Merge pull request #2085 from Alfresco/feature/MNT-23763_ImagePreviewWebscript (#2088)
MNT-23763 Fix image preview webscript for use with ES.

(cherry picked from commit fcf3e005e4)
2023-07-26 13:27:21 +01:00
alfresco-build
7ebad61406 [maven-release-plugin][skip ci] prepare for next development iteration 2023-07-07 16:23:49 +00:00
alfresco-build
587087389e [maven-release-plugin][skip ci] prepare release 21.7 2023-07-07 16:23:47 +00:00
evasques
57c3605d63 ACS-5487 - Track Total Hits on ES (#2041) (#2049)
SearchParameters - added trackTotalHits (int) attribute
SearchRequest - Added trackTotalHitsLimit (int) to the Limits attribute and mapped it to the SearchParameters
Changed the SearchRequest model in TAS to include a new RestRequestLimitsModel that has the new trackTotalHitsLimit attribute
SearchMapperTests to test the changes in the SearchParameters

(cherry picked from commit a1faf97fc5)
2023-07-07 16:38:05 +01:00
alfresco-build
2cb318a18e [maven-release-plugin][skip ci] prepare for next development iteration 2023-07-03 14:11:08 +00:00
alfresco-build
bd7af1f39c [maven-release-plugin][skip ci] prepare release 21.6 2023-07-03 14:10:59 +00:00
tiagosalvado10
7885c6a78b MNT-23451 filterQuery for facet Null (#1764) (#2033)
After MNT-23276, a "Null" value was introduced but the facetQuery does not reflect how to query nodes with that facet

(cherry picked from commit d46ae1634f)

Co-authored-by: Nicolas Barithel <nicolas.barithel@hyland.com>
2023-07-03 14:22:43 +01:00
alfresco-build
d42e9ef993 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-29 15:54:37 +00:00
alfresco-build
197590eef4 [maven-release-plugin][skip ci] prepare release 21.5 2023-06-29 15:54:33 +00:00
tiagosalvado10
102f59cde1 [MNT-23748] Bump surf webscripts (#2026)
* [MNT-23748] Bump surf-webscripts to 8.44 (#2023)

(cherry picked from commit 51fe0275df)
2023-06-29 14:26:27 +01:00
alfresco-build
529699b5e1 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-28 23:54:50 +00:00
alfresco-build
96456ec719 [maven-release-plugin][skip ci] prepare release 21.4 2023-06-28 23:54:47 +00:00
tiagosalvado10
71bbb579e6 [MNT-23642] Add error messages (#2019) (#2024)
(cherry picked from commit 689e6a23fa)
2023-06-29 00:08:56 +01:00
alfresco-build
51dcf28756 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-21 10:25:52 +00:00
alfresco-build
1639a17451 [maven-release-plugin][skip ci] prepare release 21.3 2023-06-21 10:25:49 +00:00
rrajoria
585e6042cb Fix/MNT-23612 Fix to allow only valid task status. (#1954)
* Update WorkflowServiceImpl.java

* Update WorkflowServiceImpl.java

(cherry picked from commit 4c256ab546)
2023-06-21 14:16:59 +05:30
alfresco-build
8364211384 [maven-release-plugin][skip ci] prepare for next development iteration 2023-06-20 07:05:59 +00:00
alfresco-build
f68d304d57 [maven-release-plugin][skip ci] prepare release 21.2 2023-06-20 07:05:55 +00:00
rrajoria
b55e1114e6 MNT-23724: Fix for Downloading a folder as zip with correct Name
Cherrypicked from master
2023-06-20 11:14:17 +05:30
alfresco-build
0e23ba37c6 [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-30 23:52:54 +00:00
alfresco-build
38a4d378d9 [maven-release-plugin][skip ci] prepare release 21.1 2023-05-30 23:52:51 +00:00
tiagosalvado10
65a562cd73 [MNT-23665] Removed search controls count limit (#1936) (#1968)
(cherry picked from commit 07c7342032)
2023-05-30 21:42:47 +01:00
kmagdziarz
8eab098317 Create ServicePack branch release/7.4.N 2023-05-05 12:39:50 +02:00
41 changed files with 244 additions and 80 deletions

View File

@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
if: >
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -52,7 +52,7 @@ jobs:
if: >
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -73,7 +73,7 @@ jobs:
if: >
!contains(github.event.head_commit.message, '[skip repo]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -94,7 +94,7 @@ jobs:
if: >
!contains(github.event.head_commit.message, '[skip repo]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
strategy:
fail-fast: false
matrix:
@@ -139,7 +139,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[db]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
strategy:
fail-fast: false
matrix:
@@ -169,7 +169,7 @@ jobs:
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -195,7 +195,7 @@ jobs:
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -220,7 +220,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[db]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -245,7 +245,7 @@ jobs:
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -268,7 +268,7 @@ jobs:
if: >
!contains(github.event.head_commit.message, '[skip repo]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -289,7 +289,7 @@ jobs:
if: >
!contains(github.event.head_commit.message, '[skip repo]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
strategy:
fail-fast: false
matrix:
@@ -358,7 +358,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip tas]')) ||
contains(github.event.head_commit.message, '[tas]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
strategy:
fail-fast: false
matrix:
@@ -425,7 +425,7 @@ jobs:
if: >
!contains(github.event.head_commit.message, '[skip repo]') &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
@@ -448,7 +448,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
strategy:
fail-fast: false
matrix:
@@ -479,7 +479,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags on MySQL]')) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
strategy:
fail-fast: false
matrix:
@@ -510,7 +510,7 @@ jobs:
!contains(github.event.head_commit.message, '[skip ags]') && !contains(github.event.head_commit.message, '[skip tas]')) ||
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
!contains(github.event.head_commit.message, '[skip tests]') &&
!contains(github.event.head_commit.message, '[force]')
!contains(github.event.head_commit.message, '[force')
env:
REQUIRES_LOCAL_IMAGES: true
steps:

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<properties>

View File

@@ -5,7 +5,7 @@
# Version label
version.major=7
version.minor=4
version.revision=0
version.revision=1
version.label=
# Edition label

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<properties>

View File

@@ -48,7 +48,7 @@ function tagQuery()
}
query += "ASPECT:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
//MNT-2118 Share inconsistencies when displaying locked files with tags
query += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
query += " AND -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
// MNT-20091 check to prevent cm:taggable with NULL
query += " AND ISNOTNULL:\"{http://www.alfresco.org/model/content/1.0}taggable\"";
@@ -60,7 +60,7 @@ function tagQuery()
query: query,
language: "lucene",
page: {
// query minimum rows because all usefull info will come with facets
// query minimum rows because all useful info will come with facets
maxItems: 1,
skipCount: 0
},

View File

@@ -24,7 +24,7 @@ function getCategoryNode()
else
{
var queryPath = "/" + catAspect + "/" + encodePath(path);
categoryResults = search.luceneSearch("+PATH:\"" + queryPath + "/*\" -PATH:\"" + queryPath + "/member\"");
categoryResults = search.luceneSearch("+PATH:\"" + queryPath + "/*\" AND -PATH:\"" + queryPath + "/member\"");
}
// make each result an object and indicate it is selectable in the UI
@@ -71,4 +71,4 @@ function encodePath(path)
function sortByName(a, b)
{
return (b.node.name.toLowerCase() > a.node.name.toLowerCase() ? -1 : 1);
}
}

View File

@@ -29,7 +29,7 @@ function main()
{
query = "+PATH:\"" + parsedArgs.pathNode.qnamePath + "//*\" ";
}
query += "+TYPE:\"cm:content\" +@cm\\:content.mimetype:image/*";
query += "AND +TYPE:\"cm:content\" AND +@cm\\:content.mimetype:\"image/*\"";
// Sort the list before trimming to page chunks
assets = search.query(
@@ -52,4 +52,4 @@ function main()
/**
* Images List Component: images
*/
model.images = main();
model.images = main();

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<properties>

View File

@@ -201,6 +201,11 @@ public class SearchParameters implements BasicSearchParameters
private String timezone;
/**
* Configure the limit to track the total hits on search results
*/
private int trackTotalHits;
/**
* Default constructor
*/
@@ -251,6 +256,7 @@ public class SearchParameters implements BasicSearchParameters
sp.stats = this.stats;
sp.ranges = this.ranges;
sp.timezone = this.timezone;
sp.trackTotalHits = this.trackTotalHits;
return sp;
}
@@ -1641,6 +1647,21 @@ public class SearchParameters implements BasicSearchParameters
{
this.includeMetadata = includeMetadata;
}
public int getTrackTotalHits()
{
return trackTotalHits;
}
/**
* Set a maximum value for the report of total hits. The reported number of hits will never exceed this limit even
* if more are found. If unset, the engines default tracking limit is applied. To remove any limit, set to -1.
*
* @param trackTotalHits int
*/
public void setTrackTotalHits(int trackTotalHits)
{
this.trackTotalHits = trackTotalHits;
}
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<modules>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<organization>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<developers>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<properties>

View File

@@ -0,0 +1,82 @@
/*-
* #%L
* alfresco-tas-restapi
* %%
* Copyright (C) 2005 - 2023 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 org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
public class RestRequestLimitsModel extends TestModel implements IRestModel<RestRequestLimitsModel>
{
@JsonProperty
RestRequestLimitsModel model;
private Integer permissionEvaluationTime;
private Integer permissionEvaluationCount;
private Integer trackTotalHitsLimit;
@Override
public RestRequestLimitsModel onModel()
{
return model;
}
public RestRequestLimitsModel(Integer permissionEvaluationTime, Integer permissionEvaluationCount,
Integer trackTotalHitsLimit)
{
super();
this.permissionEvaluationTime = permissionEvaluationTime;
this.permissionEvaluationCount = permissionEvaluationCount;
this.trackTotalHitsLimit = trackTotalHitsLimit;
}
public Integer getPermissionEvaluationTime()
{
return permissionEvaluationTime;
}
public void setPermissionEvaluationTime(Integer permissionEvaluationTime)
{
this.permissionEvaluationTime = permissionEvaluationTime;
}
public Integer getPermissionEvaluationCount()
{
return permissionEvaluationCount;
}
public void setPermissionEvaluationCount(Integer permissionEvaluationCount)
{
this.permissionEvaluationCount = permissionEvaluationCount;
}
public Integer getTrackTotalHitsLimit()
{
return trackTotalHitsLimit;
}
public void setTrackTotalHitsLimit(Integer trackTotalHitsLimit)
{
this.trackTotalHitsLimit = trackTotalHitsLimit;
}
}

View File

@@ -76,6 +76,7 @@ public class SearchRequest extends TestModel
String facetFormat;
List<String> include;
List<SortClause> sort;
RestRequestLimitsModel limits;
public SearchRequest()
{
@@ -279,4 +280,15 @@ public class SearchRequest extends TestModel
return this;
}
public RestRequestLimitsModel getLimits()
{
return limits;
}
public void setLimits(RestRequestLimitsModel limits)
{
this.limits = limits;
}
}

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<properties>

View File

@@ -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">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -25,7 +25,7 @@
<properties>
<acs.version.major>7</acs.version.major>
<acs.version.minor>4</acs.version.minor>
<acs.version.revision>0</acs.version.revision>
<acs.version.revision>1</acs.version.revision>
<acs.version.label />
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
@@ -62,7 +62,7 @@
<dependency.jackson.version>2.15.0-rc1</dependency.jackson.version>
<dependency.cxf.version>3.5.5</dependency.cxf.version>
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
<dependency.webscripts.version>8.40</dependency.webscripts.version>
<dependency.webscripts.version>8.44</dependency.webscripts.version>
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
<dependency.mockito-core.version>4.9.0</dependency.mockito-core.version>
<dependency.assertj.version>3.24.2</dependency.assertj.version>
@@ -150,7 +150,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-community-repo</url>
<tag>20.161</tag>
<tag>21.10</tag>
</scm>
<distributionManagement>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<dependencies>

View File

@@ -823,6 +823,11 @@ public class SearchMapper
sp.setLimitBy(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS);
sp.setMaxPermissionCheckTimeMillis(limits.getPermissionEvaluationTime());
}
if(limits.getTrackTotalHitsLimit() != null)
{
sp.setTrackTotalHits(limits.getTrackTotalHitsLimit());
}
}
}

View File

@@ -93,7 +93,7 @@ public class FacetField
public String toFilterQuery(String value)
{
return field+":\""+value+"\"";
return ("Null".equals(value)) ? "ISNULL:\"" + field + "\"" : field + ":\"" + value + "\"";
}
public String getPrefix()

View File

@@ -37,13 +37,16 @@ public class Limits
private final Integer permissionEvaluationTime;
private final Integer permissionEvaluationCount;
private final Integer trackTotalHitsLimit;
@JsonCreator
public Limits(@JsonProperty("permissionEvaluationTime") Integer permissionEvaluationTime,
@JsonProperty("permissionEvaluationCount") Integer permissionEvaluationCount)
@JsonProperty("permissionEvaluationCount") Integer permissionEvaluationCount,
@JsonProperty("trackTotalHitsLimit") Integer trackTotalHitsLimit)
{
this.permissionEvaluationTime = permissionEvaluationTime;
this.permissionEvaluationCount = permissionEvaluationCount;
this.trackTotalHitsLimit = trackTotalHitsLimit;
}
public Integer getPermissionEvaluationTime()
@@ -55,4 +58,9 @@ public class Limits
{
return permissionEvaluationCount;
}
public Integer getTrackTotalHitsLimit()
{
return trackTotalHitsLimit;
}
}

View File

@@ -745,33 +745,56 @@ public class SearchMapperTests
}
@Test
public void fromLimits() throws Exception
public void fromLimits_setNull() throws Exception
{
SearchParameters searchParameters = new SearchParameters();
searchMapper.setDefaults(searchParameters);
//Doesn't error
searchMapper.fromLimits(searchParameters, null);
assertEquals(500, searchParameters.getLimit());
assertEquals(LimitBy.UNLIMITED, searchParameters.getLimitBy());
assertEquals("LimitBy default value should be unlimited", LimitBy.UNLIMITED, searchParameters.getLimitBy());
assertEquals("Limit default value should be 500", 500, searchParameters.getLimit());
}
searchMapper.fromLimits(searchParameters, new Limits(null, null));
assertEquals(LimitBy.UNLIMITED, searchParameters.getLimitBy());
assertEquals(500, searchParameters.getLimit());
searchMapper.fromLimits(searchParameters, new Limits(null, 34));
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
assertEquals(34, searchParameters.getMaxPermissionChecks());
assertEquals(-1, searchParameters.getLimit());
assertEquals(-1, searchParameters.getMaxPermissionCheckTimeMillis());
searchParameters = new SearchParameters();
@Test
public void fromLimits_setAllLimitsAsNull() throws Exception
{
SearchParameters searchParameters = new SearchParameters();
searchMapper.setDefaults(searchParameters);
searchMapper.fromLimits(searchParameters, new Limits(1000, null));
searchMapper.fromLimits(searchParameters, new Limits(null, null, null));
assertEquals("LimitBy default value should be unlimited", LimitBy.UNLIMITED, searchParameters.getLimitBy());
assertEquals("Limit default value should be 500", 500, searchParameters.getLimit());
}
@Test
public void fromLimits_setPermissionEvaluationCount() throws Exception
{
SearchParameters searchParameters = new SearchParameters();
searchMapper.setDefaults(searchParameters);
searchMapper.fromLimits(searchParameters, new Limits(null, 34, null));
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
assertEquals(1000, searchParameters.getMaxPermissionCheckTimeMillis());
assertEquals(-1, searchParameters.getLimit());
assertEquals(-1, searchParameters.getMaxPermissionChecks());
assertEquals("MaxPermissionChecks should be set", 34, searchParameters.getMaxPermissionChecks());
assertEquals("Limit should be -1", -1, searchParameters.getLimit());
assertEquals("MaxPermissionCheckTimeMillis should be -1", -1, searchParameters.getMaxPermissionCheckTimeMillis());
}
@Test
public void fromLimits_setPermissionEvaluationTime() throws Exception
{
SearchParameters searchParameters = new SearchParameters();
searchMapper.setDefaults(searchParameters);
searchMapper.fromLimits(searchParameters, new Limits(1000, null, null));
assertEquals(LimitBy.NUMBER_OF_PERMISSION_EVALUATIONS, searchParameters.getLimitBy());
assertEquals("MaxPermissionCheckTimeMillis should be set", 1000, searchParameters.getMaxPermissionCheckTimeMillis());
assertEquals("Limit should be -1", -1, searchParameters.getLimit());
assertEquals("MaxPermissionChecks should be -1", -1, searchParameters.getMaxPermissionChecks());
}
@Test
public void fromLimits_setTrackTotalHitsLimit() throws Exception
{
SearchParameters searchParameters = new SearchParameters();
searchMapper.setDefaults(searchParameters);
searchMapper.fromLimits(searchParameters, new Limits(null, null, 10));
assertEquals("TrackTotalHits should be set", 10, searchParameters.getTrackTotalHits());
}
@Test

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.161</version>
<version>21.10</version>
</parent>
<dependencies>

View File

@@ -251,15 +251,16 @@ public class TransactionBehaviourQueue implements TransactionListener
}
catch (IllegalArgumentException e)
{
throw new AlfrescoRuntimeException("Failed to execute transaction-level behaviour " + context.method + " in transaction " + AlfrescoTransactionSupport.getTransactionId(), e);
throw new AlfrescoRuntimeException("Failed to execute transaction-level behaviour " + context.method + " in transaction " + AlfrescoTransactionSupport.getTransactionId() + " : " + e.getMessage(), e);
}
catch (IllegalAccessException e)
{
throw new AlfrescoRuntimeException("Failed to execute transaction-level behaviour " + context.method + " in transaction " + AlfrescoTransactionSupport.getTransactionId(), e);
throw new AlfrescoRuntimeException("Failed to execute transaction-level behaviour " + context.method + " in transaction " + AlfrescoTransactionSupport.getTransactionId() + " : " + e.getMessage(), e);
}
catch (InvocationTargetException e)
{
throw new AlfrescoRuntimeException("Failed to execute transaction-level behaviour " + context.method + " in transaction " + AlfrescoTransactionSupport.getTransactionId(), e.getTargetException());
String msg = e.getMessage() + (e.getTargetException() != null ? "(" + e.getTargetException().getMessage() + ")" : "");
throw new AlfrescoRuntimeException("Failed to execute transaction-level behaviour " + context.method + " in transaction " + AlfrescoTransactionSupport.getTransactionId() + " : " + msg, e.getTargetException());
}
}

View File

@@ -1605,8 +1605,6 @@ public class LDAPUserRegistry implements UserRegistry, LDAPNameResolver, Initial
this.userSearchCtls = new SearchControls();
this.userSearchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
this.userSearchCtls.setReturningAttributes(LDAPUserRegistry.this.userKeys.getFirst());
// MNT-14001 fix, set search limit to ensure that server will not return more search results then provided by paged result control
this.userSearchCtls.setCountLimit(LDAPUserRegistry.this.queryBatchSize > 0 ? LDAPUserRegistry.this.queryBatchSize : 0);
this.next = fetchNext();
}

View File

@@ -997,6 +997,20 @@ public class WorkflowServiceImpl implements WorkflowService
public WorkflowTask updateTask(String taskId, Map<QName, Serializable> properties, Map<QName, List<NodeRef>> add,
Map<QName, List<NodeRef>> remove)
{
if(properties.containsKey(WorkflowModel.PROP_STATUS)) {
LinkedList<String> validTaskStatus = new LinkedList<>();
validTaskStatus.add("Not Yet Started");
validTaskStatus.add("In Progress");
validTaskStatus.add("On Hold");
validTaskStatus.add("Cancelled");
validTaskStatus.add("Completed");
if (!validTaskStatus.contains(properties.get(WorkflowModel.PROP_STATUS))) {
throw new WorkflowException("Invalid Value is Passed for Task Status.");
}
}
String engineId = BPMEngineRegistry.getEngineId(taskId);
TaskComponent component = getTaskComponent(engineId);
// get the current assignee before updating the task

View File

@@ -3,7 +3,7 @@
repository.name=Main Repository
# Schema number
version.schema=18000
version.schema=18100
# Directory configuration
@@ -1349,7 +1349,7 @@ system.remove-alf_server-table-from-db.ignored=true
allow.unsecure.callback.jsonp=false
# pre-configured allow list of media/mime types to allow inline instead of attachment (via Content-Disposition response header)
content.nonAttach.mimetypes=application/pdf,image/jpeg,image/gif,image/png,image/tiff,image/bmp
content.nonAttach.mimetypes=application/pdf,image/jpeg,image/gif,image/png,image/tiff,image/bmp,application/octet-stream
# Zip file compression ratio threshold as a percentage, above which the zip file will be considered a "zip bomb" and the
# import extraction process cancelled.