Commit Graph

119 Commits

Author SHA1 Message Date
Domenico Sibilio
f113724f9a ACS-2245 Mitigate intermittent failure of FixedAclUpdaterTest (#916)
* ACS-2245 - Trigger CI build

* ACS-2245 - Add RepeatAtMostRule for flaky tests

* ACS-2245 - Add RepeatAtMostRuleTest to the AllUnitTestsSuite

* ACS-2245 - Rename RepeatAtMostRule to RetryAtMostRule
2022-02-01 09:14:53 +01:00
Alan Davis
f80767359f MNT-22696 Replace Rendition REST API (#880)
Code to reject zero byte renditions
Addition of:
DELETE /nodes/{nodeId}/renditions/{renditionId} 
DELETE /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId} end points

Co-authored-by: kmagdziarz <Kacper.Magdziarz@hyland.com>
2022-01-14 11:28:50 +01:00
alandavis
9058b5923b Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7
* Five fixes too many
2022-01-14 09:13:33 +00:00
alandavis
07084b22f9 Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7
* More "Pangram, fox, dog, Gym class featuring" test fixes
2022-01-14 09:09:34 +00:00
alandavis
becf46f58a Pick up T-Engines 2.5.5-A3 & T-Model 1.4.7
* Raw metadata "subject" change resulting in cm:description change
2022-01-14 07:48:58 +00:00
Alan Davis
451a9d1f60 ACS-2002 Enhance T-Router debug (#867)
Modifications to allow the enterprise repo to add transform debug from the t-router to the repo's log.

Addition of TransformerDebugTest
2022-01-05 21:46:41 +00:00
Kacper Magdziarz
ae2fb449cc ACS-2242 Attempt to fix Initialization of SecureRandom in EncryptionTest (#872)
* ACS-2242 Initializing SecureRandom only once.

* ACS-2242 adjust requested changes.
2022-01-05 11:55:01 +01:00
montgolfiere
53979f3357 ACS-2391: StorageObjectProps - add version content specific endpoints (#863)
* ACS-2391: StorageObjectProps - add version content specific endpoints

- GET /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQName}
- POST /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQName}/archive
- POST /nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropQName}/archive-restore

- since versioned content nodes are not in default workspace://SpaceStore ...
- updated existing ContentStorageInfomation (and related tests) to handle nodeRef instead of nodeId
- also fixed REST framework for operation/property for 2nd-level relationship (inc extra fix, eg. for "revert" version regression)

- update based on PR feedback (thanks SA) - also update lic header to 2022 for new/changed Java files

- update based on PR feedback (thanks MP) - minor: rename local variable (and similarly across codebase)
2022-01-04 16:23:13 +00:00
Piotr Żurek
8e43d83579 ACS-2245 Attempt to fix intermittent failure in FixedAclUpdaterTest (#864) 2022-01-04 13:28:33 +01:00
Piotr Żurek
11a4969da2 ACS-2243 Attempt to fix intermittent failure in JobLockServiceTest (#862) 2021-12-23 09:14:24 +01:00
evasques
d729443b71 MNT-22715 - Setting Version Child Assoc Index Configurable (#836)
* Added configuration to use child association index on version creation - disabled by default
* Added unit test to verify both cenarios
* Included configuration in AGS
2021-12-09 18:43:56 +00:00
evasques
c9e98b4833 MNT-22715 - Document Version Issue (#831)
* MNT-22715 - Document Version Issue - Unexpected: current version does not appear to be 1st version in the list
* Set association index on new version creation
* Unit test to verify the child assoc index is set on versions
* Set association index on new version creation on AGS create record from version
2021-12-09 13:21:52 +00:00
mpichura
4f1397eeee ACS-2200: Java API for archive/archive-restore content (#825)
* ACS-2200: Java API for archive/archive-restore content + unit tests.

* Bump restapi from 1.64 to 1.65 (#795)

* Bump utility from 3.0.45 to 3.0.47 (#794)

* ACS-2200: Applying review comments.

* ACS-2200: Applying review comments.

* ACS-2200: Adding new unit test to suite.

* ACS-2200: Adding optional archive params to archive operation.

* Bump restapi from 1.64 to 1.65 (#795)

* Bump utility from 3.0.45 to 3.0.47 (#794)

* ACS-2200: Applying review comments.

* ACS-2200: Java API for archive/archive-restore content + unit tests.
2021-12-08 16:33:20 +01:00
Ayman Harake
1f18805733 ACS-2216: Fix incorrect ContentService Java Interface - should accept content propQName (#813)
Squashed some of the commit messages:

* ACS-2216: Resolving failing tests
* ACS-2216: Reformatting code
* ACS-2216: Adding David's suggestion
* ACS-2216: Set some methods to default as per David's comments
* ACS-2216: Added test for when propertyQName has no content
* ACS-2216: Replaced try catch with assertThrows
* ACS-2216: Added propertyQName to Auditable list

Co-authored-by: David Edwards <david.edwards@hyland.com>
2021-12-03 18:12:02 +00:00
Abdul Mohammed
4468faae99 ADF-5234: [BE] Viewer - the Mimetype property should be changed when a new type of file is uploaded (#696)
* Added Apple Icons mimetype

* Added MimetypeMapContentTest for Apple Icons
2021-11-30 13:22:07 +00:00
tiagosalvado10
4314a30f3a [MNT-21953] [MNT-22491] Clear rendition content data on content change. Prevent rendition from having contentHashCode without content (#752)
* [MNT-21953] [MNT-22491] Clear rendition content data on content change. Prevent rendition from having contentHashCode without content

* [MNT-21953] [MNT-22491] Added tests

* [MNT-21953] [MNT-22491] Removed update content from test

* [MNT-21953] [MNT-22491] Improve log messages

* [MNT-21953] [MNT-22491] Changed Copyright year to 2021. Minor change in test comments.
2021-11-24 11:47:17 +00:00
Alan Davis
512540e32e ACS-2270 Read T-Engine config in alphabetical order (#806)
* T-Engines config need to be combined in the same predefined order in the all-in-one transformer,
T-Router and the Content Repository with individual T-Engines.
2021-11-22 12:53:22 +00:00
evasques
be4fa79c76 MNT-18700 - Dynamic Message bundles do not deploy/reload automatically (#805)
* Restored the ability to register dynamic messages on bootstrap
* Added unit tests on bootstrap to verify if the dynamic messages are registered on bootstrap
* Added unit tests for the Repo Admin Console regarding registering dynamic messages and classpath files
2021-11-18 15:48:40 +00:00
Alan Davis
53c70cee66 ACS-1998 Enhance the transform config (#796)
* ACS-1998 Pick up changes in transform-model 1.4.1 for "xxxSupported" elements [skip ci]
* Pick up 2.5.4 t-engines for testing
2021-11-16 15:16:51 +00:00
alandavis
7b8c865f2b ACS-2243 Disable Intermittent failure: JobLockServiceTest.testGetLockWithCallbackNormal [skip ci] 2021-11-11 11:55:06 +00:00
alandavis
38a5664cf3 ACS-2242 Disable Intermittent failure: EncryptionTests.testFailedEncryptionWithCachedCiphers [skip ci] 2021-11-11 11:54:32 +00:00
alandavis
c8b0a6dbd0 ACS-2245 Disable Intermittent failure: FixedAclUpdaterTest.testAsyncWithNodeLock [skip ci] 2021-11-11 11:52:41 +00:00
mpichura
2d4140ea64 ACS-2147 renaming method which gets storage props (#778)
* ACS-2147: Adding missing ContentStore implementation, switching some logging
to trace.

* ACS-2147: Renaming getObjectStorageProperties to getStorageProperties

* [maven-release-plugin][skip ci] prepare release 14.20

* [maven-release-plugin][skip ci] prepare for next development iteration

* Fix/mnt 21506 sanitation create people (#756)

* MNT-21506: sanitize username on nodeBrowser Repo

* [maven-release-plugin][skip ci] prepare release 14.21

* [maven-release-plugin][skip ci] prepare for next development iteration

* ACS-2148: Adding get StorageObjectProps to ContentService (#773)

* ACS-2148: Adding get StorageObjectProps to ContentService and implementation.

* ACS-2148: Adding propertyQName param to get storage property method.

* ACS-2148: Security config for added method.

* ACS-2148: Renaming getObjectStorageProperties to getStorageProperties

* ACS-2148: Javadoc fix

* ACS-2148: Fixing security context after method renaming.

* ACS-2148: ContentService with new method names.

* ACS-2147: Adding missing ContentStore implementation, switching some logging
to trace.

* ACS-2147: Renaming getObjectStorageProperties to getStorageProperties

* ACS-2148: ContentService with new method names.

* ACS-2148: Small fixes after code review.
2021-10-27 13:35:11 +02:00
Lev Belava
7ac5cb1807 ACS-2121 Alfresco repo migration from Mockito 1 to Mockito 3 (#770) 2021-10-26 23:55:03 +01:00
mpichura
e515dacab1 ACS-2148: Adding get StorageObjectProps to ContentService (#773)
* ACS-2148: Adding get StorageObjectProps to ContentService and implementation.

* ACS-2148: Adding propertyQName param to get storage property method.

* ACS-2148: Security config for added method.

* ACS-2148: Renaming getObjectStorageProperties to getStorageProperties

* ACS-2148: Javadoc fix

* ACS-2148: Fixing security context after method renaming.
2021-10-26 13:48:53 +02:00
mpichura
1b0ddb1e74 Feature/acs 2147 add get storage object props in content store (#769)
* ACS-2147: initial idea for adding storage properties to ContentStore.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* ACS-2147: adding javadoc and small fixes to ObjectStorageProps.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: initial idea for adding storage properties to ContentStore.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* ACS-2147: adding javadoc and small fixes to ObjectStorageProps.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: Adding unit tests and changes after first round of code review.

* ACS-2147: initial idea for adding storage properties to ContentStore.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* ACS-2147: adding javadoc and small fixes to ObjectStorageProps.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: Adding unit tests and changes after first round of code review.

* ACS-2147: adding implementations to ContentStore children + some static analysis cleanup.

* License header update

Co-authored-by: David Edwards <david.edwards@alfresco.com>

* ACS-2147: Fixes after reverting some 'boy scout' refactor.

* ACS-2147: Rephrasing Alfresco-derived storage properties.

* ACS-2147: Reverting some 'boy scout' refactor.

* ACS-2147: Renaming enum values.

* ACS-2147: Removing wildcard import.

Co-authored-by: David Edwards <david.edwards@alfresco.com>
2021-10-25 09:47:36 +02:00
David Edwards
c00736c639 ACS-2064 DAU: Fix response content type always PDF (#754)
* ACS-2064 ContentStore.java to require mimetype

- Updates the ContentStore interface to also require a mimetype, deprecates old method signatures
- Original interface methods maintained so code should be backwards compatible
- Implementing classes updated to reflect changes
2021-10-19 13:10:17 +01:00
Lev Belava
cbd45fcb3e MNT-21706 NodeService setAssociations list of elements is now handled. (#746)
MNT-21706 NodeService setAssociations list of elements is now handled.
2021-10-14 15:27:41 +02:00
alandavis
bb58c4a2d9 "ACS-1907 TMDQ against MySql throws SQLException in certain situations (#679)"
This reverts commit 83097d452b.
2021-08-26 14:26:01 +01:00
Davide
a8a06f4b1f SEARCH-2833 Add field for association Qname in NodeResource and ChildAssociationResource (#678) 2021-08-26 09:59:06 +02:00
alandavis
83097d452b Revert "ACS-1907 TMDQ against MySql throws SQLException in certain situations (#679)"
Kept the travis changes.

This reverts commit 85fa4b5a93.
2021-08-26 01:18:19 +01:00
Stefan Kopf
85fa4b5a93 ACS-1907 TMDQ against MySql throws SQLException in certain situations (#679)
* Added alternative approach for DBQueryEngine to page through the entire query using "LIMIT" requests instead of result set streaming
* Use the alternative approach for MySql
2021-08-25 22:05:33 +01:00
Sara
c7c40b06e1 Feature/acs 1904 fix node ref vs content url (#680)
* ACS-1904 Fix NodeRef vs ContentUrl and remove deprecated methods

* ACS-1904 remove unused imports
2021-08-25 17:22:59 +01:00
Stefan Kopf
b3d43b0500 ACS-1907: Fix typo in test case 2021-08-22 23:50:36 +02:00
Stefan Kopf
a8e1ce909e ACS-1907: Added test case to reproduce error situation 2021-08-22 23:47:26 +02:00
Alan Davis
b84e1f8100 ACS-1778 Common transform routing code for Repo and t-router (#648)
Main change is the removal of code from CombinedConfig into alfresco-transform-model as CombinedTransformConfig.The Code within LocalCombinedConfig has now moved to CombinedConfig as there is only one type of config now.

* Bump alfresco-transform-model from 1.3.1.1 to 1.4.0
* Add logWarn method
2021-08-20 15:49:10 +01:00
Jamal Kaabi-Mofrad
b68e805a37 REPO-5659: Added ALFRESCO_SYSTEM_ADMINISTRATORS group authority. (#668) 2021-08-17 12:43:33 +01:00
Sara
838d758983 Feature/acs 1782 impl request DAU in content service (#645)
* Content Service changes both ACS-1781 and 1782

* Ignore test temporarily

* ACS-1782 fix test

* ACS-1782 Test and service updates

* ACS-1781 Tests for Content Service and Store

* ACS-1782 disable rest api DAU

* ACS-1782 fix mocks in unit test

* ACS-1782 Fix integration test
2021-08-09 15:55:10 +01:00
Sara
e95100e429 Acs 1865 impl configs for da us (#634)
* ACS-1781 Config set up and validation

* ACS-1781 Unit tests for config validation

* ACS-1865 Code tidy up

* ACS-1865 Updates from PR review

* ACS-1865 Updates from review
2021-08-03 14:16:24 +01:00
evasques
ac4a1643e1 PRODSEC-4422 - Scripts not in Data Dictionary can be executed by action (#596)
* Added validation to the ScriptActionExecuter class to enforce the existing constraints on parameter script-ref (Repo has the constraint to only allow scripts in Data Dictionary / Scripts and AGS has the constraint to only allow scripts in Data Dictionary / Records Management / Records Management Scripts") by validating if the given scriptRef is in the allowed valued of the constraint set on that param
* Added a new unit test for AGS to make sure that rmscript action still works as expected when the script is in the correct folder and fails when not
* Added new case in ActionServiceImpl2Test#testExecuteScript to assert that the transaction fails when we execute the action with an invalid script
* Moved test testActionResult from ActionServiceImplTest to class ActionServiceImpl2Test - Before it ran with a script not in Data Dictionary so with the added validation it started to fail. I moved the unit test do avoid duplicating the code to create the script in the correct location.
2021-07-15 17:45:22 +01:00
evasques
6e1d25a8f0 MNT-21837 - License expires 23h earlier - correction (#544)
* period.getMillis() (joda lib) returns an int instead of a long, so on larger periods (like 30days) we get an error that the value cannot fit in an int
* Changed the validation to only calculate the remaining milliseconds in the edge case of the remaining days being zero (as both 23h before and 23h after correspond to 0 remaining days)
* Added a unit test that validates the usage 60 days up from the licence expiring to validate the problem stops occurring
Added a unit test that validates the usage 30 days after the licence expiring to cover all use cases
2021-06-21 15:17:39 +01:00
evasques
630cd99067 MNT-21837 License expires 23h earlier (#541)
* MNT-21837 - License expires 23h earlier
* Original problem is that the remaining time to license expires is calculated in days (long, not double) and anything less then 24h computes to 0 days. The validation for license being valid is that the remaining days is more than zero.
* Added method calculateMs in DateUtil class to return the interval in ms considering 2 given dates and respective timezones
* Changed the validation to use the remaining milliseconds value instead of remaining days
* Added unit test where license expires 6 hours from now - repo is not supposed to enter read-only mode
* Added unit test where license expired 1 minute ago - repo is supposed to enter read-only mode

* Removed unused import
2021-06-18 09:28:03 +01:00
Alan Davis
88b4ce155c MNT-22388 [Security] multiple pdfbox vulnerabilities (Repo) (#539)
* Remove pdfbox jars as they should no longer be needed.
* Reintroduce tests that use Tika to 'guess' mimetypes as it was the tika parse that was pulling in the pdfbox libraries.

Classes that use Tika:
* HTMLRenderingEngine - removed as it is no longer used
* RemoteConnectorResponseImpl - called tika utility toByteArray so not using pdfbox
* TikaCharsetFinder - called to identify the charset not mimetype so not using pdfbox
* MimetypeMap - main use of Tika. Used to detect mimetypes. Might have been using pdfbox.
2021-06-17 16:08:21 +01:00
Angel Borroy
f1a5425f62 SEARCH-2909 Return Http Status Code 501 (Not Implemented) in REST API… (#519)
* SEARCH-2909 Return Http Status Code 501 (Not Implemented) in REST API for invocations to Search Services that are not supported.

* SEARCH-2909 Refactor exception mapping to simplify QueryParserException.

* SEARCH-2909 Add unit tests for postQuery.

This includes a test for the status code replacement with unsupported operations.

* SEARCH-2909 Add new unit test file to test suite.

Also add copyright header to test class.

Co-authored-by: Tom Page <thomas.page@alfresco.com>
2021-06-11 16:03:55 +01:00
Nana Insaidoo
cb636d1140 MNT-22385 Cmis query GetTotalNumItems is returning wrong value (#504)
* Changes made to correct the value of totalItems when performing a TMDQ

* Fixes after review

- Slight change was made to NodePermissionAssessor to log when permission
  limits are exceeded

* Now pre-computing maxPermissionChecks value as per review suggestion
2021-05-28 09:16:38 +01:00
Nana Insaidoo
457c3d39d4 REPO-5631 Investigate different types of results for optional patches difference detection (#472)
* Now supporting other Result implementations when detecting optional patches problems
2021-05-27 16:41:06 +01:00
Nana Insaidoo
16be403a41 REPO-5632 Investigate intermittent failing tests in AppContext05TestSuite (#499)
* Increased test data to stop intermittent test failures in FixedAclUpdaterTest
2021-05-26 09:26:59 +01:00
alandavis
d88f8f7bbf MNT-22409 Legacy transformer fails to generate multi-page TIFF preview
Originally fixed on 6.2.N. A couple of the Legacy classes no longer exist so changes are not on master. Changes to the renditions, default page limit and test still apply.

(cherry picked from commit 9d276aed7081e0078ed3f7f01dabdec20c599bfe)
(cherry picked from commit ddb299ab03)
2021-05-21 07:14:57 +01:00
tiagosalvado10
83ca2878a5 [MNT-20006] Obtaining the site as system in order to allow the activity record when an user is not member of a site (#317)
[MNT-20006] Obtaining the site as system in order to allow the activity record when an user is not member
2021-05-13 11:29:18 +01:00
Alan Davis
5de64aefa9 MNT-21694 transform option converter (#444)
* MNT-21694 500 error on new logo upload with Legacy transforms (#284)

The TransformationOptionsConverter class did not convert the newer transform option format a Map<String, String> to the legacy ImageTransformationOptions class that contains the commandOption (OPT_COMMAND_OPTIONS) property. As a result no legacy transformer is asked if it can do the transform.

Originally not fixed on ACS 7 as Legacy transformers were removed, however the fix was just in the converter class and it is helpful to have identical code on branches if possible.
2021-05-11 13:48:09 +01:00