Skip to content

Commit

Permalink
feat: Add new url for role master api keys (#3215)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa committed Dec 22, 2023
1 parent 3758d33 commit 924149c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api-deploy-production-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
flagsmith_saml_revision: v1.1.0
flagsmith_workflows_revision: v1.2.5
flagsmith_auth_controller_revision: v0.0.1
flagsmith_rbac_revision: v0.6.0
flagsmith_rbac_revision: v0.7.0
sse_pgp_private_key: ${{ secrets.SSE_PGP_PRIVATE_KEY }}

- name: Deploy task processor to Production
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-deploy-staging-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
flagsmith_saml_revision: v1.1.0
flagsmith_workflows_revision: v1.2.5
flagsmith_auth_controller_revision: v0.0.1
flagsmith_rbac_revision: v0.6.0
flagsmith_rbac_revision: v0.7.0
sse_pgp_private_key: ${{ secrets.SSE_PGP_PRIVATE_KEY }}

- name: Deploy task processor to Staging
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-tests-with-private-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defaults:
working-directory: api

env:
FLAGSMITH_RBAC_REVISION: v0.6.0
FLAGSMITH_RBAC_REVISION: v0.7.0

jobs:
test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
FLAGSMITH_SAML_REVISION: v1.1.0
FLAGSMITH_RBAC_REVISION: v0.6.0
FLAGSMITH_RBAC_REVISION: v0.7.0
FLAGSMITH_WORKFLOWS_REVISION: v1.2.5
FLAGSMITH_AUTH_CONTROLLER_REVISION: v0.0.1

Expand Down
15 changes: 14 additions & 1 deletion api/organisations/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,27 @@
RoleOrganisationPermissionViewSet,
RoleProjectPermissionsViewSet,
RolesByGroupViewSet,
RolesbyMasterAPIPrefixViewSet,
RolesByUserViewSet,
RoleViewSet,
UserRoleViewSet,
)

organisations_router.register("roles", RoleViewSet, basename="organisation-roles")
nested_user_roles_routes = routers.NestedSimpleRouter(
parent_router=organisations_router, parent_prefix=r"users", lookup="user"
)

nested_api_key_roles_routes = routers.NestedSimpleRouter(
parent_router=organisations_router,
parent_prefix=r"master-api-keys",
lookup="api_key",
)

nested_group_roles_routes = routers.NestedSimpleRouter(
parent_router=organisations_router, parent_prefix=r"groups", lookup="group"
)

organisations_router.register("roles", RoleViewSet, basename="organisation-roles")
nested_roles_router = routers.NestedSimpleRouter(
organisations_router, r"roles", lookup="role"
)
Expand All @@ -125,6 +132,11 @@
viewset=RolesByUserViewSet,
basename="role-users",
)
nested_api_key_roles_routes.register(
prefix="roles",
viewset=RolesbyMasterAPIPrefixViewSet,
basename="role-api-keys",
)
nested_group_roles_routes.register(
prefix="roles",
viewset=RolesByGroupViewSet,
Expand Down Expand Up @@ -155,6 +167,7 @@
url(r"^", include(organisations_router.urls)),
url(r"^", include(nested_roles_router.urls)),
url(r"^", include(nested_user_roles_routes.urls)),
url(r"^", include(nested_api_key_roles_routes.urls)),
url(r"^", include(nested_group_roles_routes.urls)),
]
)

3 comments on commit 924149c

@vercel
Copy link

@vercel vercel bot commented on 924149c Dec 22, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 924149c Dec 22, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

docs – ./docs

docs-flagsmith.vercel.app
docs-git-main-flagsmith.vercel.app
docs.bullet-train.io
docs.flagsmith.com

@vercel
Copy link

@vercel vercel bot commented on 924149c Dec 22, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.