Skip to content

refactor(iam): consolidate access catalog route lookup into required_permission - #63

Merged
nivek-ph merged 3 commits into
mainfrom
feat(iam)/catalog-required-permission
Aug 31, 2026
Merged

refactor(iam): consolidate access catalog route lookup into required_permission#63
nivek-ph merged 3 commits into
mainfrom
feat(iam)/catalog-required-permission

Conversation

@nivek-ph

@nivek-ph nivek-ph commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the two-step catalog lookup (resolvepermission_for_menu) with required_permission, so request admission resolves the concrete Permission in one step.
  • Keep AccessCatalog as the small boundary over MenuIndex and RouteIndex; remove the low-value source.rs seam, tighten internal visibility, and stop loading the unused menu title.
  • Normalize request method/path once in AccessService::evaluate, keep binding normalization at index construction, and document the lookup precondition.
  • Preserve the existing role-only, additive, allow-only RBAC behavior; no Direct Permissions or authorization bypasses are introduced.

Verification

  • cargo fmt --all --check
  • cargo test -p iam --locked
  • cargo test --workspace --locked
  • cd apps/desktop && pnpm test
  • cd apps/desktop && pnpm build
  • Standards review: PASS
  • Spec review: PASS

…ing logic

- Merged `source.rs` into `mod.rs` to streamline access catalog management.
- Updated `AccessNode` and `AccessBinding` structures to enhance clarity and maintainability.
- Refactored loading logic in `AccessCatalog` to directly query the database for nodes and bindings.
- Adjusted permission handling to use normalized method and path parameters for consistency.
- Removed redundant code and improved test cases to reflect changes in the access catalog structure.
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
axum-admin Ignored Ignored Aug 31, 2026 1:01am
axum-admin-web Ignored Ignored Aug 31, 2026 1:01am

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-31T01:06:23.653177Z e3d8f1d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@nivek-ph

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: e3d8f1dab3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nivek-ph
nivek-ph merged commit 25bc9e5 into main Aug 31, 2026
8 checks passed
@nivek-ph
nivek-ph deleted the feat(iam)/catalog-required-permission branch August 31, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant