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

[beta] v1 legacy roles MVP #1390

Merged
merged 48 commits into from Sep 9, 2022
Merged

[beta] v1 legacy roles MVP #1390

merged 48 commits into from Sep 9, 2022

Conversation

jctanner
Copy link
Contributor

What is this PR doing:

Issue: AAH-1812

Reviewers must know:

Notes:

PR Author: Add a QE reviewer (exceptions);
Reviewers: look for sound code, no code smells, docs & test coverage
Merger: When merging, include the Jira issue link in the squashed commit

@netlify
Copy link

netlify bot commented Jul 27, 2022

Deploy Preview for galaxyng ready!

Name Link
🔨 Latest commit 0b84251
🔍 Latest deploy log https://app.netlify.com/sites/galaxyng/deploys/631a60d72fcf380008cda968
😎 Deploy Preview https://deploy-preview-1390--galaxyng.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@jctanner jctanner marked this pull request as draft July 27, 2022 23:54
@jctanner jctanner marked this pull request as ready for review August 9, 2022 18:14
@jctanner jctanner changed the title [WIP] [beta] v1 legacy roles MVP [beta] v1 legacy roles MVP Aug 9, 2022
@jctanner jctanner mentioned this pull request Aug 11, 2022
5 tasks
@jctanner
Copy link
Contributor Author

/retest

3 similar comments
@jctanner
Copy link
Contributor Author

/retest

@jctanner
Copy link
Contributor Author

/retest

@drodowic
Copy link
Collaborator

/retest

galaxy_ng/app/api/v1/models.py Show resolved Hide resolved
galaxy_ng/app/api/v1/models.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/urls.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets.py Outdated Show resolved Hide resolved
galaxy_ng/app/utils/galaxy.py Show resolved Hide resolved
galaxy_ng/app/api/v1/tasks.py Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/urls.py Outdated Show resolved Hide resolved
Copy link
Contributor

@awcrosby awcrosby left a comment

Choose a reason for hiding this comment

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

Provided comments. After all conversations are resolved, LGTM

No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
Copy link
Member

@newswangerd newswangerd left a comment

Choose a reason for hiding this comment

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

General notes:

  • There's a lot of misc print statements that need to be removed.

galaxy_ng/app/access_control/access_policy.py Outdated Show resolved Hide resolved
galaxy_ng/app/access_control/access_policy.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets/namespaces.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets/sync.py Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets/roles.py Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets/roles.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets/roles.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/viewsets/roles.py Outdated Show resolved Hide resolved
galaxy_ng/app/api/v1/serializers.py Show resolved Hide resolved
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
@rochacbruno rochacbruno removed their request for review September 7, 2022 15:12
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
No-Issue

Signed-off-by: James Tanner <tanner.jc@gmail.com>
Copy link
Member

@newswangerd newswangerd left a comment

Choose a reason for hiding this comment

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

A couple of minor nitpicks, no deal breakers.

Before this goes into production I do want to see:

  1. A proper RBAC implementation for legacy namespace
  2. Replacement for the username==legacy_namespace.name logic to determine if a user owns a namespace
  3. Some kind of system to migrate the existing users from galaxy into galaxy_ng so we don't have to rely on the user's github username matching one of the namespaces

permission_classes = [LegacyAccessPolicy]
authentication_classes = GALAXY_AUTHENTICATION_CLASSES

def destroy(self, request, pk=None):
Copy link
Member

Choose a reason for hiding this comment

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

I think the default DRF method should work for this

"""A list of legacy roles."""

queryset = LegacyRole.objects.all().order_by('full_metadata__created')
ordering_fields = ('full_metadata__created')
Copy link
Member

Choose a reason for hiding this comment

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

do you need to order this in 3 places?

@jctanner jctanner merged commit 6f3a4e0 into ansible:master Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants