Skip to content

feat(authorization): add self-service permission inspection API - #114

Merged
mckaragoz merged 3 commits into
CodeBeamOrg:devfrom
mckaragoz:GetMyPermissions
Oct 26, 2026
Merged

mckaragoz merged 3 commits into
CodeBeamOrg:devfrom
mckaragoz:GetMyPermissions

Conversation

@mckaragoz

Copy link
Copy Markdown
Contributor

Description

Closes #102.

Adds GetMyPermissionsAsync() to let authenticated users inspect permissions assigned through their roles without requiring administrative access.

Changes

  • Add a self-service endpoint and Client SDK method for retrieving assigned permissions.
  • Reuse the existing permission resolver and authorization pipeline.
  • Aggregate and deduplicate permissions while preserving wildcard semantics.
  • Enforce authenticated-user and tenant boundaries.
  • Exclude deleted and cross-tenant roles from permission resolution.

Notes

  • Returned permissions represent role assignments, not final authorization decisions.
  • Use CheckAsync() for policy-aware authorization checks.
  • No breaking changes.

@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.20779% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.79%. Comparing base (ead92c3) to head (30e8ae3).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...n.Contracts/Infrastructure/PermissionNormalizer.cs 76.19% 3 Missing and 2 partials ⚠️
...ation.Reference/Services/UserPermissionsService.cs 96.87% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #114      +/-   ##
==========================================
+ Coverage   86.76%   86.79%   +0.03%     
==========================================
  Files         679      681       +2     
  Lines       18753    18818      +65     
  Branches     2283     2287       +4     
==========================================
+ Hits        16271    16334      +63     
- Misses       1737     1738       +1     
- Partials      745      746       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mckaragoz
mckaragoz merged commit 1cfb7cd into CodeBeamOrg:dev Oct 26, 2026
3 checks passed
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.

[Design]: Provide a Secure API for Querying Effective User Permissions

2 participants