Skip to content

feat: Add new url for roles master api keys#3154

Merged
novakzaballa merged 6 commits into
mainfrom
feat/add-new-url-for-role-master-api-keys
Dec 21, 2023
Merged

feat: Add new url for roles master api keys#3154
novakzaballa merged 6 commits into
mainfrom
feat/add-new-url-for-role-master-api-keys

Conversation

@novakzaballa
Copy link
Copy Markdown
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

@vercel
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 13, 2023

Uffizzi Preview deployment-42731 was deleted.

@codecov-commenter
Copy link
Copy Markdown

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, matthewelwell and zachaysan and removed request for a team December 13, 2023 17:29
Comment thread api/organisations/urls.py Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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