Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FDDC60D5 for ; Wed, 22 Jun 2011 16:19:10 +0000 (UTC) Received: (qmail 83100 invoked by uid 500); 22 Jun 2011 16:19:10 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 83065 invoked by uid 500); 22 Jun 2011 16:19:10 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 83058 invoked by uid 99); 22 Jun 2011 16:19:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 16:19:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2011 16:19:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 37752428620 for ; Wed, 22 Jun 2011 16:18:49 +0000 (UTC) Date: Wed, 22 Jun 2011 16:18:49 +0000 (UTC) From: "angela (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <553826236.29770.1308759529224.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1032458214.23995.1308653512041.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (JCR-2999) Access control evaluation does not properly cope with XA transactions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-2999?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated JCR-2999: ------------------------ Fix Version/s: 2.3.0 2.2.8 Assignee: angela > Access control evaluation does not properly cope with XA transactions > --------------------------------------------------------------------- > > Key: JCR-2999 > URL: https://issues.apache.org/jira/browse/JCR-2999 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, security, transactions > Reporter: angela > Assignee: angela > Fix For: 2.2.8, 2.3.0 > > Attachments: JCR-2999.patch > > > the following test fails with ItemNotFoundException at the indicated position due to the fact that > the parent n2 is EXISTING but still not visible to the system session responsible for the ac > evaluation. > public void testTransaction() throws Exception { > // make sure testUser has all privileges > Privilege[] privileges = privilegesFromName(Privilege.JCR_ALL); > givePrivileges(path, privileges, getRestrictions(superuser, path)); > // create new node and lock it > Session s = getTestSession(); > UserTransaction utx = new UserTransactionImpl(s); > utx.begin(); > // add node and save it > Node n = s.getNode(childNPath); > if (n.hasNode(nodeName1)) { > Node c = n.getNode(nodeName1); > c.remove(); > s.save(); > } > Node n2 = n.addNode(nodeName1); > s.save(); > > Node n3 = n2.addNode(nodeName2); > s.save(); // exception > // commit > utx.commit(); > } > A possible workaround would be to make sure that ItemSaveOperation.persistTransientItems > retrieves the parent without having the checkPermission enabled since we can assume that > the new item could not be added if the parent was not readable in the first place.... but careful > evaluation would be required. > NOTE: this is just one example of the AC-evaluation not properly dealing with XA transactions. > I am convinced that other examples could be find.... -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira