<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is runCommand or an equivalent available from Javascript in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/is-runcommand-or-an-equivalent-available-from-javascript/m-p/109925#M77173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For security reasons (i.e. that any user with READ access can execute a javascript etc.) we have turned off certain native Rhino features i.e. the ability to import java classes directly and use them. Obviously it doesn't take much imagination to see how a user with very low security in Alfresco could write and execute a very dangerous javascript file…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the way around this is to code up a java class that performs the code work that you need (such as executing external commands) and then configure that Java class in as an extension object to the JavaScript API - this is the supported pattern:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#Adding_custom_Script_APIs" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#Adding_custom_Script_APIs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2007 09:00:19 GMT</pubDate>
    <dc:creator>kevinr</dc:creator>
    <dc:date>2007-04-30T09:00:19Z</dc:date>
    <item>
      <title>Is runCommand or an equivalent available from Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/is-runcommand-or-an-equivalent-available-from-javascript/m-p/109924#M77172</link>
      <description>I'm brand new to Alfresco and was evaluating whether we could perform a fairly complex task that involves handling input TIFF files.&amp;nbsp; I wanted to run them through a Javascript rule that would call a program which extracts barcode information.&amp;nbsp; This would be attached to the document as another proper</description>
      <pubDate>Fri, 27 Apr 2007 21:08:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/is-runcommand-or-an-equivalent-available-from-javascript/m-p/109924#M77172</guid>
      <dc:creator>sgray</dc:creator>
      <dc:date>2007-04-27T21:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is runCommand or an equivalent available from Javascript</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/is-runcommand-or-an-equivalent-available-from-javascript/m-p/109925#M77173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For security reasons (i.e. that any user with READ access can execute a javascript etc.) we have turned off certain native Rhino features i.e. the ability to import java classes directly and use them. Obviously it doesn't take much imagination to see how a user with very low security in Alfresco could write and execute a very dangerous javascript file…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the way around this is to code up a java class that performs the code work that you need (such as executing external commands) and then configure that Java class in as an extension object to the JavaScript API - this is the supported pattern:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API#Adding_custom_Script_APIs" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/JavaScript_API#Adding_custom_Script_APIs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kevin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2007 09:00:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/is-runcommand-or-an-equivalent-available-from-javascript/m-p/109925#M77173</guid>
      <dc:creator>kevinr</dc:creator>
      <dc:date>2007-04-30T09:00:19Z</dc:date>
    </item>
  </channel>
</rss>

