34
34
import org .exist .storage .txn .TransactionManager ;
35
35
import org .exist .storage .txn .Txn ;
36
36
import com .evolvedbinary .j8fu .function .ConsumerE ;
37
- import org .exist .util .LockException ;
38
37
import org .exist .xmldb .XmldbURI ;
39
38
import org .exist .xquery .XPathException ;
40
39
@@ -125,8 +124,8 @@ public static void updatePermissions(final DBBroker broker, final XmldbURI pathU
125
124
throw new XPathException ("Resource or collection '" + pathUri .toString () + "' does not exist." );
126
125
}
127
126
128
- // keep a write lock in the transaction
129
- transaction .acquireLock (doc .getUpdateLock (), LockMode .WRITE_LOCK );
127
+ // // keep a write lock in the transaction
128
+ // transaction.acquireLock(doc.getUpdateLock(), LockMode.WRITE_LOCK);
130
129
131
130
final Permission permissions = doc .getPermissions ();
132
131
permissionModifier .accept (permissions );
@@ -140,8 +139,8 @@ public static void updatePermissions(final DBBroker broker, final XmldbURI pathU
140
139
transact .commit (transaction );
141
140
broker .flush ();
142
141
} else {
143
- // keep a write lock in the transaction
144
- transaction .acquireLock (collection .getLock (), LockMode .WRITE_LOCK );
142
+ // // keep a write lock in the transaction
143
+ // transaction.acquireLock(collection.getLock(), LockMode.WRITE_LOCK);
145
144
146
145
final Permission permissions = collection .getPermissionsNoLock ();
147
146
permissionModifier .accept (permissions );
@@ -155,7 +154,7 @@ public static void updatePermissions(final DBBroker broker, final XmldbURI pathU
155
154
collection .release (LockMode .WRITE_LOCK );
156
155
}
157
156
}
158
- } catch (final XPathException | PermissionDeniedException | IOException | TriggerException | TransactionException | LockException e ) {
157
+ } catch (final XPathException | PermissionDeniedException | IOException | TriggerException | TransactionException e ) {
159
158
throw new PermissionDeniedException ("Permission to modify permissions is denied for user '" + broker .getCurrentSubject ().getName () + "' on '" + pathUri .toString () + "': " + e .getMessage (), e );
160
159
}
161
160
}
0 commit comments