refactor(oci): de-duplicate registry admin check, sha256 fallback, dead re-exports (BUNYIP-81) #234

Merged
David merged 2 commits from chore/bunyip-81-oci-registry-dedup into main 2026-06-26 11:23:39 +02:00
Member

Collapse the two admin-gate paths and the sha256 fallback-digest to a single source, and drop unused re-exports so the registry surface stays minimal and consistent.

  • assert_entitled (oci_registry.rs) now calls a new OciBearerUser::is_admin() helper instead of the inline user.role == "admin" check, mirroring User::is_admin() so both admin gates evolve together.
  • Extract resolve_manifest_digest() in oci_registry.rs and call it from both the member pull path and the admin cache-refresh path (admin_oci.rs), replacing the duplicated sha256 fallback block. Drops the now-unused sha2 import from admin_oci.rs.
  • Remove the unused OciPullGuard/BlobHandle/REGISTRY_AUDIENCE re-exports from lib.rs; none have consumers.

#BUNYIP-81

Collapse the two admin-gate paths and the sha256 fallback-digest to a single source, and drop unused re-exports so the registry surface stays minimal and consistent. - assert_entitled (oci_registry.rs) now calls a new OciBearerUser::is_admin() helper instead of the inline user.role == "admin" check, mirroring User::is_admin() so both admin gates evolve together. - Extract resolve_manifest_digest() in oci_registry.rs and call it from both the member pull path and the admin cache-refresh path (admin_oci.rs), replacing the duplicated sha256 fallback block. Drops the now-unused sha2 import from admin_oci.rs. - Remove the unused OciPullGuard/BlobHandle/REGISTRY_AUDIENCE re-exports from lib.rs; none have consumers. #BUNYIP-81
refactor(oci): de-duplicate registry admin check, sha256 fallback, dead re-exports (BUNYIP-81)
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 20s
Check / fmt + clippy + build + tests (pull_request) Successful in 55m59s
0176e55479
Collapse the two admin-gate paths and the sha256 fallback-digest to a single source, and drop unused re-exports so the registry surface stays minimal and consistent.

- assert_entitled (oci_registry.rs) now calls a new OciBearerUser::is_admin() helper instead of the inline user.role == "admin" check, mirroring User::is_admin() so both admin gates evolve together.
- Extract resolve_manifest_digest() in oci_registry.rs and call it from both the member pull path and the admin cache-refresh path (admin_oci.rs), replacing the duplicated sha256 fallback block. Drops the now-unused sha2 import from admin_oci.rs.
- Remove the unused OciPullGuard/BlobHandle/REGISTRY_AUDIENCE re-exports from lib.rs; none have consumers.

#BUNYIP-81
Merge branch 'main' into chore/bunyip-81-oci-registry-dedup
All checks were successful
E2E / Playwright against deployment (pull_request) Successful in 3m20s
Check / fmt + clippy + build + tests (pull_request) Successful in 15m12s
Create release / Create release from merged PR (pull_request) Has been skipped
442c67ed60
David merged commit c3975f198d into main 2026-06-26 11:23:39 +02:00
David deleted branch chore/bunyip-81-oci-registry-dedup 2026-06-26 11:23:39 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!234
No description provided.