-
Notifications
You must be signed in to change notification settings - Fork 1
Save clearance items to groups and return clearance items based on user access to groups #1744
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
Open
lamppu
wants to merge
13
commits into
main
Choose a base branch
from
refactorings-for-clearance-items
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.
+3,271
−297
Conversation
This file contains hidden or 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
142836c to
ae306d9
Compare
ae306d9 to
87a363b
Compare
Add extensions for the Playwright test fixture [1] and add some seeding functions for upcoming tests. The fixture setup ensures that all test data is properly removed after the tests, even with test failures. The seed functions are also easily reusable through different tests. Add a base fixture extension that includes extensions needed in all tests, and make separate extensions for different routers for easier handling of the router's path infix, and to allow different authentication contexts for the tests, as the need for these may slightly differ based on which router's tests are in question. In the fixtures, code executed after `await use(...)` will run during teardown after the test has finished. [1]: https://playwright.dev/docs/test-fixtures#creating-a-fixture Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
…ess to This will be used to populate a clearance group selector in the UI. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
The selector component shows the clearance groups that the user has write or read access to, and allows to select a writable one. Any new clearance items made will be added to the selected group. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
If the user has the realm role "app-user", and therefore has permission to create clearance items, but doesn't have write access to any clearance groups, show a message in the clearance item forms to instruct the user to contact a system administrator. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
The clearance items will belong to groups and will be returned based on the user's or a token's access rights. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
Also add the license conclusions created by the bulk conclusion to the group. The clearance items will belong to groups and will be returned based on the user's or a token's access rights. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
…on edit If the bulk conclusion edit results in new license conclusions being added to the database, also sync the groups of the new license conclusions to match the bulk conclusion's group(s). Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
The clearance items will belong to groups and will be returned based on the user's or a token's access rights. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
Allow to filter by groups in the clearance item GET endpoints, and without filters return all items from all groups the user has access to. Also return the groups for the items in the GET responses. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
Show icons/badges representing the groups in the clearance library tables, in the clearance inspector window in the `MainUI` package view, and in the clearance listings for the package in the `MainUI` tabs. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
For the affected files listing, and the bulk conclusion detail endpoint, check that the user has access to a group that the item belongs to. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
87a363b to
bb25b2b
Compare
In the initial implementation of the endpoint, all clearance items of the curator are added to the specified clearance group, and removed from other groups. The endpoint can later be extended for example to allow moving/copying only specific items between groups. Signed-off-by: Johanna Lamppu <johanna.lamppu@doubleopen.org>
bb25b2b to
331c10f
Compare
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.
Please see the individual commits for details.
Clearance library:

MainUI bulk conclusions view:

Package view with clearance group selector open:
