39
39
import org .exist .storage .lock .Lock .LockMode ;
40
40
import org .exist .storage .txn .Txn ;
41
41
import com .evolvedbinary .j8fu .function .ConsumerE ;
42
- import org .exist .util .LockException ;
43
42
import org .exist .util .SyntaxException ;
44
43
import org .exist .xmldb .XmldbURI ;
45
44
import org .exist .xquery .XPathException ;
@@ -134,8 +133,8 @@ private static void updatePermissions(final DBBroker broker, final Txn transacti
134
133
135
134
final DocumentImpl doc = lockedDoc .getDocument ();
136
135
137
- // keep a write lock in the transaction
138
- transaction .acquireDocumentLock (() -> brokerPool .getLockManager ().acquireDocumentWriteLock (doc .getURI ()));
136
+ // // keep a write lock in the transaction
137
+ // transaction.acquireDocumentLock(() -> brokerPool.getLockManager().acquireDocumentWriteLock(doc.getURI()));
139
138
140
139
141
140
final Permission permissions = doc .getPermissions ();
@@ -144,8 +143,8 @@ private static void updatePermissions(final DBBroker broker, final Txn transacti
144
143
broker .storeXMLResource (transaction , doc );
145
144
}
146
145
} else {
147
- // keep a write lock in the transaction
148
- transaction .acquireCollectionLock (() -> brokerPool .getLockManager ().acquireCollectionWriteLock (collection .getURI ()));
146
+ // // keep a write lock in the transaction
147
+ // transaction.acquireCollectionLock(() -> brokerPool.getLockManager().acquireCollectionWriteLock(collection.getURI()));
149
148
150
149
final Permission permissions = collection .getPermissionsNoLock ();
151
150
permissionModifier .accept (permissions );
@@ -154,7 +153,7 @@ private static void updatePermissions(final DBBroker broker, final Txn transacti
154
153
}
155
154
broker .flush ();
156
155
}
157
- } catch (final XPathException | PermissionDeniedException | IOException | LockException e ) {
156
+ } catch (final XPathException | PermissionDeniedException | IOException e ) {
158
157
throw new PermissionDeniedException ("Permission to modify permissions is denied for user '" + broker .getCurrentSubject ().getName () + "' on '" + pathUri .toString () + "': " + e .getMessage (), e );
159
158
}
160
159
}
0 commit comments