Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add check relation middleware #1841

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

huwshimi
Copy link
Contributor

Done

  • Add middleware for checking ReBAC relations.
  • Move checks for audit log permissions to the sidebar.

QA

  • Connect to JIMM.
  • Log in and the sidebar should display the permissions and logs nav items if you're an admin, otherwise the will be hidden.

Details

https://warthogs.atlassian.net/browse/WD-18369

@webteam-app
Copy link

Copy link

github-actions bot commented Jan 29, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 98.01% (🎯 95%) 14550 / 14844
🟢 Statements 98.01% (🎯 95%) 14550 / 14844
🟢 Functions 98.17% (🎯 95%) 593 / 604
🟢 Branches 92.01% (🎯 90%) 2917 / 3170
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/components/PrimaryNav/PrimaryNav.tsx 100% 95.34% 100% 100%
src/juju/api.ts 98.76% 94.11% 95.45% 98.76% 158, 251, 477-478, 505-506
src/juju/jimm/JIMMV4.ts 100% 100% 100% 100%
src/juju/jimm/api.ts 100% 100% 100% 100%
src/store/general/selectors.ts 100% 100% 100% 100%
src/store/juju/selectors.ts 97.36% 92.41% 100% 97.36% 548, 572, 584, 596, 624-625, 696, 720, 727, 733, 809-810, 833-834, 870-871, 896-897, 925-926
src/store/juju/slice.ts 97.91% 90.38% 100% 97.91% 115-116, 140-141, 289-290, 292-293
src/store/middleware/check-auth.ts 95.91% 94.73% 100% 95.91% 35-39
src/store/middleware/model-poller.ts 97.8% 92.5% 100% 97.8% 48-49, 132, 134-135, 184, 382
Generated in workflow #8 for commit cecb1d1 by the Vitest Coverage Report Action

@huwshimi huwshimi merged commit bc62164 into canonical:main Jan 30, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants