mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AR-191, AR-192: CIFS and other network protocols will now treat everything as read-only when the server is in read-only mode
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3124 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,11 +16,14 @@
|
||||
*/
|
||||
package org.alfresco.repo.security.permissions.impl;
|
||||
|
||||
import net.sf.acegisecurity.AccessDeniedException;
|
||||
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
|
||||
/**
|
||||
* Interceptor to translate and possibly I18Nize exceptions thrown by service calls.
|
||||
*/
|
||||
public class ExceptionTranslatorMethodInterceptor implements MethodInterceptor
|
||||
{
|
||||
private static final String MSG_ACCESS_DENIED = "permissions.err_access_denied";
|
||||
@@ -36,10 +39,14 @@ public class ExceptionTranslatorMethodInterceptor implements MethodInterceptor
|
||||
{
|
||||
return mi.proceed();
|
||||
}
|
||||
catch(AccessDeniedException ade)
|
||||
catch (net.sf.acegisecurity.AccessDeniedException ade)
|
||||
{
|
||||
throw new org.alfresco.repo.security.permissions.AccessDeniedException(MSG_ACCESS_DENIED, ade);
|
||||
throw new AccessDeniedException(MSG_ACCESS_DENIED, ade);
|
||||
}
|
||||
catch (InvalidDataAccessApiUsageException e)
|
||||
{
|
||||
// this usually occurs when the server is in read-only mode
|
||||
throw new AccessDeniedException(MSG_ACCESS_DENIED, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user