Commit Graph

4 Commits

Author SHA1 Message Date
Ana Bozianu
2d473a865e Merge branch 'feature-2.4/RM-2996_UploadUnfiledReacordsWithRuleOnFilePlan' into 'release/V2.4'
Feature 2.4/rm 2996 upload unfiled reacords with rule on file plan

RM-2996 - Files can not be uploaded in Unfiled Records if the File Plan has rules defined applying to sub-folders

The execution of rules as well as RM's RecordsManagementContainer.onCreateChildAssociation behavior fire before transaction commit and is unpredictable which one will run first. If the rule runs first the newly uploaded node doesn't have rma:filePlanComponent set at the time the method shouldRuleBeAppliedToNode executes. Calling recordService.isFiled(nodeRef)) will trigger capability check among which ViewRecordsCapability will check if the record has the rma:filePlanComponent aspect.

As a fix I ran the code from shouldRuleBeAppliedToNode method as system to avoid capability check.

I am aware the fix is a workaround but I think this is part of a bigger problem. The rules are fired before transaction commit and may conflict with other behaviors registered on transaction commit. However, we cannot add the aspect earlier in RM.

See merge request !37
2016-02-22 08:54:59 +00:00
Tom Page
2bd1f7cdf9 Merge release/V2.3 into release/V2.4. 2016-02-18 09:29:01 +00:00
Ana Bozianu
3700a455c9 RM-2996 - Files can not be uploaded in Unfiled Records if the File Plan has rules defined applying to sub-folders.
- recordService.isFiled(nodeRef) fires capability check which conflicts with RM behavior so I run shouldRuleBeAppliedToNode code as system to skip capability check
   - this approach is a workaround
2016-02-17 15:37:19 +02:00
Tuna Aksoy
adf7e9630c RM-2940 (Create parent pom.xml file above rm-community and rm-enterprise) 2016-01-31 20:11:15 +00:00