-
-
Notifications
You must be signed in to change notification settings - Fork 181
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(organizations): add new asset endpoint for owners and admins TASK-960 #5218
Open
noliveleger
wants to merge
26
commits into
main
Choose a base branch
from
task-960-organization-assets-endpoint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ion-assets-endpoint
…ion-assets-endpoint
…ion-assets-endpoint
…ion-assets-endpoint
…to support org admins
noliveleger
force-pushed
the
task-960-organization-assets-endpoint
branch
from
October 31, 2024 22:06
855905d
to
12a1425
Compare
…eting submissions
noliveleger
force-pushed
the
task-960-organization-assets-endpoint
branch
from
October 31, 2024 22:13
12a1425
to
58163fd
Compare
Few comments according to the new PR workflow:
|
noliveleger
changed the title
feat(Organizations): add new asset endpoint for owners and admins TASK-960
feat(organizations): add new asset endpoint for owners and admins TASK-960
Nov 4, 2024
@noliveleger should the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Added a new endpoint to retrieve organization assets, accessible to both owners and admins.
Description:
This update introduces a dedicated endpoint that allows organization owners and admins to access a complete list of assets associated with their organization. Owners and admins have unrestricted access to these assets by virtue of their roles, without needing explicit permissions.
Notes:
As part of this update, a refactor was implemented in the unit test suite to minimize code duplication when testing organization admin access across various endpoints. This refactor allows us to test admin access without explicitly assigning permissions, ensuring that the tests more accurately reflect role-based access.
Testing
user2 is now an admin and should be able to see and to do whatever they want on user1's organization projects, they should be able to access the org assets list:
/api/v2/<organization_uid>/assets/
user3 is a regular member, they cannot access
/api/v2/<organization_uid>/assets/
organization_uid
can be retrieve from/me
inorganization
property.Create a project with user3
/api/v2/assets/
) and should have been assignedmanage_asset
permissionCreate a project with user2
manage_asset
permissionCreate a project with user1
By-pass front-end checks to allow org admins access project details
npm run watch
to compile front-end build on the fly (with kobo-install,./run.py -cf run -p 3000:3000 --rm kpi npm run watch
)When this work, you can test the admin role by navigating in the project detail. The API responses should always be
2xx
.