Last active
March 11, 2024 03:00
-
-
Save douglascrp/3a66190e2120ff572277103bd66857ed to your computer and use it in GitHub Desktop.
Disable alfresco policy in Javascript.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext(); | |
var model = Packages.br.com.dgcloud.model.CustomerXModel; | |
var policyBehaviourFilter = context.getBean('policyBehaviourFilter', Packages.org.alfresco.repo.policy.BehaviourFilter); | |
try { | |
policyBehaviourFilter.disableBehaviour(node.nodeRef, model.TYPE_DOCUMENT_EMPLOYEE_QNAME); | |
// your code here | |
} finally { | |
policyBehaviourFilter.enableBehaviour(node.nodeRef, model.TYPE_DOCUMENT_EMPPLOYEE_QNAME); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment