Last active
March 11, 2022 17:22
-
-
Save hi-ko/079c3103e37234559ba3ba526d302939 to your computer and use it in GitHub Desktop.
Alfresco Javascript Console
This file contains hidden or 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
// example for the ecm4u smartTransformer to (re)create high quality Previews for Office-Docs | |
var suffixList=['pptx', 'ppt', 'xlsx', 'xls', 'docx', 'doc']; | |
recurse(document, function(node) { | |
if ( node.isDocument){ | |
var suffix=node.properties["cm:name"].split('.').pop(); | |
if (suffixList.indexOf(suffix.toLowerCase()) >= 0) { | |
print(node.displayPath+'/'+node.name+': ' + smarttransformer.createThumbnails(node).message); | |
} | |
} | |
}); |
This file contains hidden or 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
recurse(companyhome, function(node) { | |
for each(permission in node.fullPermissions) { | |
if (/;DIRECT$/.test(permission)) { | |
logger.log(node.displayPath + "/"+ node.name + ";" + permission); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment