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

Collection upload/deprecate - fix permission checks #4015

Merged
merged 17 commits into from
Dec 4, 2023

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Jul 21, 2023

Issue: AAH-2439, AAH-2853

Fixes permission checks for collection upload/deprecate on collection list ,namespace detail & collection detail.

action features model or object permissions
copy display_repositories logged in
delete - ansible.delete_collection OR galaxy.change_namespace
remove display_repositories ansible.delete_collection OR galaxy.change_namespace
deprecate - galaxy.change_namespace
upload - galaxy.upload_to_namespace
sign can_create_signatures AND NOT can_upload_signatures galaxy.change_namespace AND galaxy.upload_to_namespace
  • search still won't respect any namespace permissions, ns detail & collection detail will
  • search & ns detail don't do versions, collection detail does

@github-actions github-actions bot added the backport-4.7 This PR should be backported to stable-4.7 (2.4) label Jul 21, 2023
@himdel himdel added the backport-4.8 This PR should be backported to stable-4.8 (2.4) label Sep 18, 2023
@himdel himdel removed the backport-4.7 This PR should be backported to stable-4.7 (2.4) label Nov 11, 2023
@himdel himdel force-pushed the aah2439-collection-actions branch 2 times, most recently from 0583d32 to 36131d9 Compare November 18, 2023 03:29
@himdel himdel added backport-4.9 This PR should be backported to stable-4.9 (2.4) and removed backport-4.8 This PR should be backported to stable-4.8 (2.4) labels Nov 20, 2023
@himdel himdel force-pushed the aah2439-collection-actions branch 2 times, most recently from 5913683 to cc1c98f Compare November 21, 2023 03:55
@himdel himdel marked this pull request as ready for review November 21, 2023 03:56
@himdel himdel force-pushed the aah2439-collection-actions branch 4 times, most recently from 9b02b08 to 0e32cf0 Compare November 30, 2023 23:10
@himdel
Copy link
Collaborator Author

himdel commented Dec 1, 2023

@nixocio this should be ready now :)

Copy link
Contributor

@nixocio nixocio left a comment

Choose a reason for hiding this comment

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

@himdel looks good to me. There are a couple of cypress test failures. Not sure if they are flaky ones.

@himdel
Copy link
Collaborator Author

himdel commented Dec 4, 2023

Thanks :) yeah, those are just screenshot differences, some of the tables tend to shift a few pixels for some reason..

diff--__ansible__repositories

diff--__signature-keys

@himdel himdel merged commit d0ad573 into ansible:master Dec 4, 2023
17 of 18 checks passed
@himdel himdel deleted the aah2439-collection-actions branch December 4, 2023 16:44

This comment was marked as outdated.

himdel added a commit to himdel/ansible-hub-ui that referenced this pull request Dec 4, 2023
* Collection upload/deprecate - fix permission checks

Issue: AAH-2439
Issue: AAH-2853

* CollectionHeader - move actions & permissions to CollectionDropdown

* Search,NamespaceDetail - use CollectionDropdown

* namespace detail respect namespace permissions

* fix delete collectio/ns disabled message, use description

* inline tryOpenDeleteModalWithConfirm

* deleteFn in all 3 dropdowns

* linter fix

* namespace detail - use object permissions for upload,delete,edit

* tests - constistent kebab-toggle click

* cy.openHeaderKebab - and scroll to top first

* Ratings: don't load scores outside community mode

No-Issue

* collection-kebab - switch to data-cy

* scrollTo fix

* aargh, is it a timing bug?

* upload new version is no longer available without permissions

* openHeaderKebab: add comment about the wait

(cherry picked from commit d0ad573)
himdel added a commit that referenced this pull request Dec 4, 2023
* Collection upload/deprecate - fix permission checks

Issue: AAH-2439
Issue: AAH-2853

* CollectionHeader - move actions & permissions to CollectionDropdown

* Search,NamespaceDetail - use CollectionDropdown

* namespace detail respect namespace permissions

* fix delete collectio/ns disabled message, use description

* inline tryOpenDeleteModalWithConfirm

* deleteFn in all 3 dropdowns

* linter fix

* namespace detail - use object permissions for upload,delete,edit

* tests - constistent kebab-toggle click

* cy.openHeaderKebab - and scroll to top first

* Ratings: don't load scores outside community mode

No-Issue

* collection-kebab - switch to data-cy

* scrollTo fix

* aargh, is it a timing bug?

* upload new version is no longer available without permissions

* openHeaderKebab: add comment about the wait

(cherry picked from commit d0ad573)
@github-actions github-actions bot added the backported-4.9 This PR has been backported to stable-4.9 (2.4) label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4.9 This PR should be backported to stable-4.9 (2.4) backported-4.9 This PR has been backported to stable-4.9 (2.4)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants