diff options
| author | dev <dev@example> | 2026-11-13 22:28:22 +0000 |
|---|---|---|
| committer | dev <dev@example> | 2026-11-13 22:28:22 +0000 |
| commit | 50f296cf7609ce77d41b9fb3df51d6aeec8330d6 (patch) | |
| tree | a84e367145fa7f86f285b844144c55b3b3452cf3 /container/Dockerfile | |
| parent | e12fc6e1c14afaab8711c6c9ac695ce911d83df5 (diff) | |
| download | access-control-50f296cf7609ce77d41b9fb3df51d6aeec8330d6.tar.gz access-control-50f296cf7609ce77d41b9fb3df51d6aeec8330d6.zip | |
Remove protected-refs: a rule covers what it names, and nothing else
`set protected-refs` raised the price of a listed ref by one level: write
needed force on main, force needed admin. It was a second, invisible list, and
it was the one part of the model that could not be read off the rules. The
question it was supposed to answer - "who can move main?" - stopped having an
answer in the file: you had to hold both the rules and the protection list in
your head and combine them, and the combination was where surprises lived.
Giving someone force so they could rewrite their own branches quietly let them
fast-forward main, because a fast-forward costs write, protection raised it to
force, and there it was.
Now a rule says what it says. An unscoped rule covers main; a rule that means
to leave main alone names what it covers instead, and the refusal says "bob
holds write on team, but not on refs/heads/main" rather than blaming a list
nobody remembered. Excluding one person from one branch is a matter of what
their lines name, which is the same mechanism as everything else here.
The setting is refused by name rather than ignored. A policy that still carries
one would otherwise mean "everyone with write can fast-forward main" while
looking like it said the opposite, and the operator would learn that from a push
rather than from the parser; so `set protected-refs` is now an error that says
what to write instead, and the suite asserts both halves - that it is refused,
and that cleaning it out makes the file valid again.
What stays: refs outside refs/heads and refs/tags still need admin whatever a
rule appears to grant about them. That one the policy genuinely cannot name in
advance, because it is the part of the namespace no policy was written with in
mind.
`protect` goes with it, so the editing commands are grant and revoke. The
example policy now names frank, whose two refs are main and the release tags,
because that is the shape the file is now meant to be written in.
Diffstat (limited to 'container/Dockerfile')
0 files changed, 0 insertions, 0 deletions
