Skip to content

Commit 05dca9b

Browse files
committed
Attempt to fix #3505
1 parent 96bb442 commit 05dca9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exist-core/src/main/java/org/exist/storage/NativeBroker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,10 @@ private Tuple2<Boolean, Collection> getOrCreateCollectionExplicit_rootCollection
744744
final CollectionCache collectionCache, final Optional<Tuple2<Permission, Long>> creationAttributes)
745745
throws TriggerException, ReadOnlyException, PermissionDeniedException, LockException, IOException {
746746

747+
if(!parentCollection.getPermissionsNoLock().validate(getCurrentSubject(), Permission.WRITE)){
748+
throw new PermissionDeniedException("No write permissions for " + parentCollection.getURI().getCollectionPath());
749+
}
750+
747751
final CollectionTrigger trigger;
748752
if(parentCollection == null) {
749753
trigger = new CollectionTriggers(this, transaction);

0 commit comments

Comments
 (0)