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 new url for roles master api keys #3154

Merged
merged 6 commits into from
Dec 21, 2023

Conversation

novakzaballa
Copy link
Contributor

@novakzaballa novakzaballa commented Dec 13, 2023

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Add new URL for role's API keys.
GET: organisations/{organisation_pk}/roles-api-key/{prefix}/

Related with #3042 and https://github.com/Flagsmith/flagsmith-rbac/pull/14

How did you test this code?

The unit tests included in the RBAC PR: https://github.com/Flagsmith/flagsmith-rbac/pull/14

Copy link

vercel bot commented Dec 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 21, 2023 7:23pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 21, 2023 7:23pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 21, 2023 7:23pm

Copy link
Contributor

github-actions bot commented Dec 13, 2023

Uffizzi Preview deployment-42731 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d677f33) 95.99% compared to head (9553176) 96.10%.

❗ Current head 9553176 differs from pull request most recent head 5852593. Consider uploading reports for the commit 5852593 to get more accurate results

Files Patch % Lines
api/organisations/urls.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3154      +/-   ##
==========================================
+ Coverage   95.99%   96.10%   +0.11%     
==========================================
  Files        1062     1059       -3     
  Lines       32265    32038     -227     
==========================================
- Hits        30973    30791     -182     
+ Misses       1292     1247      -45     

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

@novakzaballa novakzaballa requested review from a team, zachaysan and matthewelwell and removed request for a team December 13, 2023 17:29
Comment on lines 149 to 153
path(
"api/v1/organisations/<int:organisation_pk>/roles-api-key/<str:prefix>/",
RolesbyMasterAPIPrefixViewSet.as_view({"get": "list"}),
name="roles_api_keys_by_prefix",
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why go with as_view here instead of adding to the router?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL was updated and it was added to the router

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good so I approved it, but when are the view's tests going to be added?

@novakzaballa novakzaballa added this pull request to the merge queue Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants