Paweł Dzierżanowski
unread,Jan 26, 2026, 3:26:56 AM (9 days ago) Jan 26Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Repo and Gerrit Discussion
After years of digging through Gerrit’s Access Controls documentation - especially the Permission evaluation reference section - I finally reached a point where I felt pretty comfortable with it ;)
That lasted until today, when I realized there might be an inconsistency between the reference and the actual implementation of how BLOCK works… or maybe I still don’t fully understand it.
The docs say:
"For blocking access, all rules marked BLOCK are tested, and if one such rule matches, the user is denied access."
But then, regarding the double use of exclusive, they add:
"When looking at BLOCK, ‘exclusive’ stops the search downward."
So… are all blocking rules evaluated or not?
Based on my tests, it seems they are - and that exclusive doesn’t actually stop the downward search:
projA:
refs/*:
ALLOW read user1
ALLOW read user2
projB: (inheritFrom projA)
refs/*:
exclusiveGroupPermissions = read
BLOCK read user1
ALLOW read user2
projC: (inheritFrom projB)
refs/*
BLOCK read user2
Result: user2 can see projC
For me, I prefer the actual implementation
(it feels natural that BLOCK always works, and lower-level projects are not prevented from extending the blocked group), but then the statement
" ‘exclusive’ stops the search downward" is imprecise.
I hope it is not an implementation bug, because I'd like to rely on BLOCK to work like it works today ;)
Paweł