07-18-2009 11:43 AM
That said, I understand the problem and can't help wondering if explicit identification of "developer scripts" and "end user scripts" might help. "Developer scripts" would only be able to be created by developers and would have the ability to "runas" etc., while "end user scripts" could be created by anyone but would remain locked down within the current scripting security sandbox.
Interestingly enough, in 2.1.3 this distinction has already started appearing - Javascript scripts loaded from the classpath are trusted (ie. are "developer scripts") and have full access (via Rhino's native Java integration) to Java APIs (including the Foundation Services API), while Javascript scripts loaded from the repository are not trusted (ie. are "end user scripts") and run within the scripting security sandbox. The only missing piece here would be to expose a "runas" Javascript API that's only available to "developer scripts" (Alfresco's existing Java "runas" API is not readily usable from Javascript due to the use of callbacks).
<config evaluator="node-type" condition="mymodel:mytype">
<actions>
<action id="do_something_interesting">
<permissions>
<permission allow="true">Write</permission>
</permissions>
<label>Do something interesting</label>
<image>/images/icons/edit_form.gif</image>
<script>classpath:alfresco/extension/scripts/do_something_interesting_using_Java_API.js</script>
</action>
<!– Actions Menu for Create in Browse screen –>
<action-group id="browse_create_menu">
<action idref="do_something_interesting" />
</action-group>
</actions>
</config>
07-18-2009 01:01 PM
javax.faces.FacesException: org.alfresco.error.AlfrescoRuntimeException: Invalid store ref: Does not contain :// classpath:alfresco/extension/scripts
caused by:
org.apache.jasper.JasperException: org.alfresco.error.AlfrescoRuntimeException: Invalid store ref: Does not contain :// classpath:alfresco/extension/scripts
caused by:
org.alfresco.error.AlfrescoRuntimeException: Invalid store ref: Does not contain :// classpath:alfresco/extension/scripts
07-20-2009 04:22 AM
07-20-2009 04:33 AM
07-20-2009 04:40 AM
08-11-2010 03:34 PM
01-25-2011 06:56 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.