Commit Graph

165 Commits

Author SHA1 Message Date
George Evangelopoulos
c11b951e57 Update javadoc to clarify variable use (#1397) 2022-09-16 16:12:38 +03:00
Tom Page
ac1a77156e ACS-3363 Support inheritedBy in GET rule sets. (#1387)
* ACS-3363 E2E test for inheritedBy.

* ACS-3363 Support optional inheritedBy field in GET rule sets.

* ACS-3363 Update to new version of TAS REST API.

* ACS-3363 Remove user from private site before calling method under test.
2022-09-16 11:06:17 +01:00
Maciej Pichura
772109d629 ACS-3429: Better fitting exceptions on POST rule with actions (#1376)
* ACS-3429: Better fitting exceptions on POST rule with actions when missing or invalid fields.

* ACS-3429: Fixing and adding tests
2022-09-15 10:35:32 +02:00
Alan Davis
64955658fc HXENG-64 refactor ATS
* Pick refactored t-core 3.0.0 and t-service 2.0.0.
* Use new package names from t-model
* Fix up a few test failures due to incomplete t-config which is now checked.
2022-09-14 22:07:07 +01:00
Tom Page
b7d2d3bae9 ACS-3536 Omit actionContext for rules. (#1383)
* ACS-3536 Omit actionContext for rules.

It will always be set to 'Rule' anyway.

* ACS-3536 Stop setting actionContext in rules E2E tests.

Also add extra assertion for action params in new test.
2022-09-14 12:56:38 +01:00
tiagosalvado10
430d15f32d [MNT-21901] Prevent update preferences concurrency errors (#821)
* [MNT-21901] Added PersistenceException to retry exceptions. Added validation to get retry cause

* [MNT-21901] Check exception message only if it is JavaScriptException

* [MNT-21901] Removed unit test from repository. Added new test on remote-api. Changed ExceptionStackUtil validation.

* [MNT-21901] Improved JavascriptException validation. Added exception delimiter to prevent accepting exceptions with the same partial name.
2022-09-13 16:40:23 +01:00
krdabrowski
4692d471a3 ACS-3430: POST support for conditions (#1356) 2022-09-13 11:32:29 +01:00
Tom Page
400b33c7eb ACS-3489 Use specified rule set. (#1373)
* ACS-3280 Get inherited rule sets. [tas]

This needs to work the exact same way as get inherited rules.

* ACS-3280 Replace LinkedList with ArrayList.

* ACS-3280 Don't return duplicated rule sets when there are links.

* ACS-3489 E2E test for getting rules with inheritance.

* ACS-3489 Inherited rule sets are also associated with folders.

* ACS-3489 Fix test to contain expected values.

* ACS-3489 Ensure only rules from specified rule set are returned.

Add E2E test case for inherited links and fix unit tests.

* ACS-3489 Fix audit reference in RuleService.
2022-09-13 10:23:16 +01:00
George Evangelopoulos
fa04a7264f ACS-3485: Change naming (#1372) 2022-09-12 20:33:24 +03:00
Tom Page
6e5d37067d ACS-3531 Ignore testDownloadFileContent since it fails so frequently. 2022-09-12 18:07:18 +01:00
Tom Page
80ccf64df8 ACS-3280 Get inherited rule sets. [tas] (#1323)
* ACS-3280 Get inherited rule sets. [tas]

This needs to work the exact same way as get inherited rules.

* ACS-3280 Replace LinkedList with ArrayList.

* ACS-3280 Don't return duplicated rule sets when there are links.
2022-09-12 11:44:42 +01:00
Antonio Felix
8bc3b357cf Fix/mnt 23190 queries to find users not returning results (#1365)
* MNT-23190 - Added "hint:useCQ" in order for the new users to appear on the results
2022-09-09 11:07:15 +01:00
Maciej Pichura
a568c87571 ACS-3429, ACS-3336: Rule action mappings (create), validations (update) - part 2 (#1332)
* ACS-3429, ACS-3336: Adding initial TAS tests for create rule with multiple actions, adding action parameters mappings and rule/action validations for rule update.

* ACS-3429: Removing duplicated assertion.

* ACS-3429: Changing NodeRef conversions to use only node id.
2022-08-25 12:46:42 +02:00
Kacper Magdziarz
3aac7be11c MNT-23103 - Downloading a document replaces filename having space with + character (#1327)
* MNT-23103 Change encoder for content disposition filename to be consistent with RFC5987.

Add test covering filename encoding.
2022-08-24 15:59:11 +02:00
George Evangelopoulos
0af001be2a Support for linking to a single rule set (#1324)
* Support for linking to a single rule set

* ACS-3435: Small fix to get parent  node for rule set.

* ACS-3435: Revert unnecessary change

* ACS-3435: added tests

* ACS-3435: move test assertions

* ACS-3435: adding tests

Co-authored-by: mpichura <maciej.pichura@hyland.com>
2022-08-24 15:58:04 +03:00
Maciej Pichura
0b94042b6f ACS-3429 post support for actions (#1305)
* ACS-3429: Initial attemp to add action mappings for create rule.

* ACS-3429: Adding rule action validation (TBC).

* ACS-3429: Adding some basic unit tests.

* ACS-3429: Fixing existing unit tests.

* ACS-3429: Adding some unit tests, small fixes.

* ACS-3429: Fixing existing TAS tests.

* ACS-3429: Fixing test after merge from master.

* ACS-3429: Updating TAS REST dependency.

* ACS-3429: Small fixes after review.

* ACS-3429: Refactoring conversion of action parameters + unit tests adjustments.

* ACS-3429: More unit tests for action parameter conversions.

* ACS-3429: More unit tests for action parameter conversions.

* ACS-3429: Removing unused imports.

* ACS-3429: Adding missing bean definition.
2022-08-19 16:29:37 +02:00
krdabrowski
12bc363bcd ACS-3353: POST support for "other fields" (#1287) 2022-08-18 14:19:39 +01:00
Tom Page
2ab89f0d79 ACS-3280 Is inheritance enabled rule settings. (#1317)
* ACS-3280 REST tests for -isInheritanceEnabled- setting.

* ACS-3280 Allow setting/getting isInheritanceEnabled for folders.

* ACS-3280 E2E tests for negative cases.

* ACS-3280 Unit tests for RuleSettingsImpl. [tas]

* Update to released TAS REST API. [tas]

* ACS-3280 Code review fixes.

* ACS-3280 Use correct version of TAS. [tas]
2022-08-18 10:53:19 +01:00
mikolajbrzezinski
cc3f8aaff4 ACS-3316 Fix custom models downloading and XSS (#1304)
* Revert "Revert "ACS-3316 Fix HTML sanitisation bypass (#1266)" (#1294)"

This reverts commit 6c407b1ef5.

* ACS-3316 Set node name for download node

* ACS-3316 Update license

Co-authored-by: Damian.Ujma@hyland.com <Damian.Ujma@hyland.com>
2022-08-17 10:14:40 +02:00
George Evangelopoulos
be925ab67d Change exception type (#1316) 2022-08-16 16:44:29 +03:00
George Evangelopoulos
984bc151af ACS-3290: V1 REST API endpoint for linking to ruleset (#1269)
* ACS-3290: Endpoint for linking to ruleset

* ACS-3290: Small fixes to REST API endpoint definition.

* ACS-3290: Small fixes in bean initialization.

* ACS-3290: Fix changes after rebasing and add exception message

* ACS-3290: Added unit tests

* ACS-3290: Refactoring and moving logic to RulesImpl interface

* ACS-3290: Remove unused imports and refactoring

* ACS-3290: Formatting

Co-authored-by: mpichura <maciej.pichura@hyland.com>
2022-08-15 15:08:40 +03:00
Tom Page
4bae0f2060 ACS-3358 Support isShared field. (#1301)
* Use the new include method.

* ACS-3358 Rename the shared field to isShared.

* ACS-3358 Make isShared an optional field.

* ACS-3358 Add TAS tests for the optional isShared field.

* ACS-3358 Upgrade to release version of TAS REST API. [tas]

* ACS-3358 Update test descriptions.

* ACS-3358 Update toString of Rule.
2022-08-12 15:37:57 +01:00
mikolajbrzezinski
6c407b1ef5 Revert "ACS-3316 Fix HTML sanitisation bypass (#1266)" (#1294)
This reverts commit 885f21ff86.
2022-08-10 14:36:25 +02:00
Tom Page
bba1664fef ACS-3361 Support for inclusionType. (#1286)
* ACS-3361 Support for inclusionType.

* ACS-3361 Update to released version of TAS Rest API. [tas]

* ACS-3361 Better coverage of different inclusion types. [tas]
2022-08-10 10:58:15 +01:00
Tom Page
8884cc9563 ACS_3362 GET rule set can include optional owningFolder field. (#1280)
* ACS_3362 GET rule set can include optional owningFolder field. [skip ci]

* ACS_3362 Update to use release version of TAS. [tas]

* ACS_3362 Refactor RuleSetLoader into its own class. [tas]
2022-08-09 10:05:14 +01:00
mikolajbrzezinski
885f21ff86 ACS-3316 Fix HTML sanitisation bypass (#1266)
* ContentGet context file update

* Get mimetype from ContentReader and check if should be forced to downlaod

* Changes according to comments

* Code duplication removal

* Missing spaces, touch-ups to Javadoc and logic

* tests for slingshot

* Tests for contentGet and formatting changes
2022-08-08 14:26:33 +02:00
dependabot[bot]
924005e94e Bump jetty-webapp from 8.2.0.v20160908 to 9.4.34.v20201102 in /remote-api (#270)
* Bump jetty-webapp in /remote-api

Upping jetty to 10.0.11 with a few necessary modifications to avoid errors
Swapping charsets to lowercase, adding ignoring of ambiguous link security issues for jetty (since it is only used in 

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mstrankowski <marcin.strankowski@hyland.com>
2022-08-08 11:59:07 +02:00
Tom Page
af97aca661 ACS-3360 GET APIs for rule sets. (#1263)
ACS-3360 GET APIs for rule sets.

Move RulesImpl and RuleSetsImpl into their own package.
Split out node validation into a new class.
2022-08-04 17:27:51 +02:00
krdabrowski
8a79d3bed1 ACS-3229: Rules v1 REST API - Get rule definition - mapping of conditions (#1252)
ACS-3229: Rules v1 REST API - Get rule definition
- adding mapping of "conditions"
- fixing trigger constants - uppercase -> lowercase
- fixing booleanMode - uppercase -> lowercase
2022-08-02 14:10:52 +02:00
krdabrowski
001e7a4bff ACS-3229: Rules v1 REST API - Get rule definition - mapping of actions (#1245)
ACS-3229: Rules v1 REST API - Get rule definition
- adding mapping of "actions"
2022-08-01 10:35:52 +02:00
Maciej Pichura
7b4f7c9174 ACS-3345 e2e REST API TAS tests delete rule (#1256)
* ACS-3345: REST API TAS tests for delete rule.

* ACS-3345: REST API TAS tests for delete rule.

* ACS-3345: REST API TAS tests for delete rule.

* ACS-3345: Fixing the naming.

* ACS-3345: REST API TAS tests for delete rule.
2022-07-29 14:29:56 +02:00
Kristian Dimitrov
bf69340e4b ACS-2827: Initial commit (#1259) 2022-07-28 16:50:43 +01:00
Tom Page
378347ae35 ACS-3214 Unit tests for update rule API. (#1257) 2022-07-28 08:12:08 +01:00
Tom Page
54ba3ea998 ACS-3214 Fix compilation error introduced by integration of two features. 2022-07-27 16:16:58 +01:00
Tom Page
13ee559a29 ACS-3214 Update rules. (#1254) 2022-07-27 15:16:46 +01:00
krdabrowski
ac9151ed86 Rules v1 REST API - Get rule definition - mapping of "other fields" (#1244)
ACS-3229: Rules v1 REST API - Get rule definition
- adding mapping of so-called "other fields"
2022-07-27 14:02:08 +02:00
Tom Page
74bf3146b3 ACS-3346 Require CHANGE permission for POST/DELETE rules. (#1251) 2022-07-27 09:03:59 +01:00
Tom Page
8f2f8cb04c ACS-3227 Simple rules tests. (#1236) [tas]
* ACS-3227 Initial tests for POST rules API.

* ACS-3227 Add sanity tests for getting created rules.

* Update license header year.
2022-07-22 12:10:01 +01:00
Tom Page
3f3698f32a ACS-3227 POST Rule Fixes. (#1235)
* ACS-3227 Don't try to load rule set node if using -default-.

It might not exist yet, since it's created along with the first rule.

Also avoid using id of rule before it has been created.

* ACS-3227 Add a hard-coded action while we don't support supplying actions in the POST.
2022-07-21 13:36:17 +01:00
Maciej Pichura
366796947f ACS-3220 Folder rules delete rule v1 API (#1232)
* ACS-3220: Delete single folder rule.

* ACS-3220: Delete single folder rule - adding more negative unit tests.

* ACS-3220: Delete single folder rule - fixing review comments.
2022-07-21 14:27:58 +02:00
Tom Page
84f7726cbd ACS-3225 REST API to create one or more rules. (#1216) [tas]
* ACS-3225: Folder Rules v1 REST API - Create Rule

* ACS-3225 Create one or more rules within a folder/rule set.

* ACS-3225 Update ExtendedRuleServiceImpl in AGS to match new interface.

* ACS-3225 Code review fixes.

Make RuleBuilder an inner class, add documentation to API and rename method to createRules.

Co-authored-by: Krystian Dabrowski <krystian.dabrowski@hyland.com>
2022-07-20 10:23:30 +01:00
krdabrowski
0b7909be40 ACS-3229: Rules v1 REST API - Get rule definition (#1205)
ACS-3229: Rules v1 REST API - Get rule definition
2022-07-13 15:59:29 +02:00
krdabrowski
101eb1843d ACS-3198: Folder rules v1 REST API - List rules for node (#1193)
ACS-3198: Rules v1 REST API - List rules for a folder node
2022-07-07 19:40:47 +02:00
Marcin Strankowski
43480468af Feature/acs 3169 implement security mechanism for mail action (#1189)
Implementing access restriction for actions
Updating copyrights of modified files
Moving core restriction processing to an AbstractBase class
PR Review fixes
Slight improvement for future extensibility
2022-07-06 16:07:40 +02:00
krdabrowski
12455d37b6 ACS-2606: ACS - migration Mockito version from 3.* to 4.* (#1146)
ACS-2606: ACS - migration Mockito version from 3.* to 4.*
2022-06-22 12:02:10 +02:00
Damian Ujma
7c0f6998ec PRODSEC-6261 - Add the missing Object Level Authorization call (#1160)
* PRODSEC-6261 Add 'shouldNotGetProcessesByNotInvolvedUser' test

* PRODSEC-6261 Add user validation to 'getProcess' method

* PRODSEC-6261 Add TestRail annotation minor fix
2022-06-20 11:59:25 +02:00
Piotr Żurek
6f27737d90 ACS-2322 Don't compare audit properties for CMIS TCK RootFolderTest (#1159)
* ACS-2322 
Check the passthrough implementation
Skip properties which might be modified asynchronously
Update copyright headers
Slight refactoring and using Mockito.spy instead of proxy
2022-06-14 16:45:46 +02:00
Kacper Magdziarz
b7bd6aa215 [ACS-3006] Revert changes made to implement a validation logic (#1139)
* Revert "ACS-2744 Private action validation logic (#1051)"

This reverts commit 64998b5c53.

* Revert "[ACS-2747] Prevent private action execution from the V1 HTTP API. Added end-to-end test method. (#1108)"

This reverts commit 8edfd4bdce.
2022-05-30 13:18:44 +02:00
Marcin Strankowski
f5c1e26a9b ACS-2850: fix for intermittent failure on expiryLock test (#1083)
* ACS-2850: fix for intermittent failure on expiryLock test

First issue was int rounding of '(expirationDate - new Date())/1000', which for really close values of timeout set and passed through lockInfo could be rounded down to 0. Replaced by a rounding up formula.

Second issue was treating timeout == 0 as timeout.infinite. WebDav Infinite timeout has it's own marker "-1", in case of 0, lock was automatically turned into infinite time lock, while it should be an exception instead as creating a lock for 0s timeout is a programming error - the lock would immediatelly be expired upon creation (perhaps even with a date in the past, seeing as the expiryDate is filled).
Changes made clarify the intent behind calling the method instead of obfuscating it by passing the int value through date operations
2022-05-17 17:10:32 +02:00
mikolajbrzezinski
1ccb8a2164 Mnt 22905/case sensitive query fix (#1107)
* useCQ = true

* useCQ back to original

* useCQ = true

* Copyright Update

* useCQ restored, Javascrpit changed

* Javascript changes to filter

* PR comments requested change

* Revert "PR comments requested change"

This reverts commit 0673b6c3ff.

* Revert "useCQ restored, Javascrpit changed"

This reverts commit 00b79b5aca.

* Revert "Copyright Update"

This reverts commit 76d1f1c005.

* Revert "useCQ = true"

This reverts commit 215ad952f5.

* Revert "useCQ back to original"

This reverts commit deb5e82218.

* Revert "useCQ = true"

This reverts commit 115910ffc1.

* test change

* Initial changes

* Further changes

* Space deleted

* jobtitle search

* Restore check sorting and mock

* Avoid null [hint:useCQ]

* Wrong sign

* Fix

* Clean up

* Initial changes

* Rename Method
2022-05-17 15:17:56 +02:00