Fallout from fix ALF-3884: Share does not report access denied exceptions correctly

- The low-level exception was changed to be more explicit about the 'read-only' state


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22451 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-09-13 13:18:52 +00:00
parent 4e6c7598f1
commit 1386e9f4b4

View File

@@ -30,6 +30,7 @@ import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.transaction.ReadOnlyServerException;
import org.alfresco.util.ApplicationContextHelper;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.PostgreSQLDialect;
@@ -141,6 +142,13 @@ public class TransactionServiceImplTest extends TestCase
txn.commit();
fail("Read-only transaction wasn't detected");
}
catch (ReadOnlyServerException e)
{
// This is now thrown at the lower layers, but it *is* possible for one of the later
// exceptions to get through: Fixed ALF-3884: Share does not report access denied exceptions correctly
@SuppressWarnings("unused")
int i = 0;
}
catch (InvalidDataAccessApiUsageException e)
{
// expected this ...