<?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 [WebScript] exception raised by getPermissions in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/webscript-exception-raised-by-getpermissions/m-p/111007#M78009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Alfresco version 2.1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;an AccessDeniedException occur when calling the ScriptNode.getPermissions() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it occurs only on given nodes such as companyhome, which are not fully accessible by the connected user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Shouldn't it be handled by the API ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to reproduce : companyhome.getPermissions() on any script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message:&amp;nbsp;&amp;nbsp;&amp;nbsp;Failed to execute script &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'/dev/alfresco/WEB-INF/classes/alfresco/templates/webscripts/dev/test.get.js': &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wrapped org.alfresco.repo.security.permissions.AccessDeniedException: Access Denied. You do not have the appropriate permissions to perform this operation. (AlfrescoScript#4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception:&amp;nbsp;&amp;nbsp;&amp;nbsp;net.sf.acegisecurity.AccessDeniedException - Access is denied.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:86)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:238)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2007 17:14:54 GMT</pubDate>
    <dc:creator>leo</dc:creator>
    <dc:date>2007-07-27T17:14:54Z</dc:date>
    <item>
      <title>[WebScript] exception raised by getPermissions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-exception-raised-by-getpermissions/m-p/111007#M78009</link>
      <description>Alfresco version 2.1an AccessDeniedException occur when calling the ScriptNode.getPermissions() method.it occurs only on given nodes such as companyhome, which are not fully accessible by the connected user.Shouldn't it be handled by the API ?to reproduce : companyhome.getPermissions() on any script</description>
      <pubDate>Fri, 27 Jul 2007 17:14:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-exception-raised-by-getpermissions/m-p/111007#M78009</guid>
      <dc:creator>leo</dc:creator>
      <dc:date>2007-07-27T17:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: [WebScript] exception raised by getPermissions</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/webscript-exception-raised-by-getpermissions/m-p/111008#M78010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;an AccessDeniedException occur when calling the ScriptNode.getPermissions() method. &lt;BR /&gt;it occurs only on given nodes such as companyhome, which are not fully accessible by the connected user.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;This is expected, but I tested anyway.&amp;nbsp; The appropriate Web Script error page is rendered with the appropriate exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Shouldn't it be handled by the API ?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;How would you like it handled? I'm not sure I understand what the issue is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to protect your script against permissions, use the following method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;boolean hasPermission(string permission) &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:58:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/webscript-exception-raised-by-getpermissions/m-p/111008#M78010</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2007-07-31T09:58:48Z</dc:date>
    </item>
  </channel>
</rss>

