-
Notifications
You must be signed in to change notification settings - Fork 136
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
Remove django guardian #1057
Remove django guardian #1057
Conversation
|
||
from rest_framework import serializers | ||
from rest_framework.exceptions import ValidationError | ||
|
||
from pulpcore.app.models.role import Role | ||
|
||
from pulpcore.app.role_util import get_perms_for_model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bmbouter do you agree, we should have these in the plugin api?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so; if a plugin needs to use it and it's the right tool for the job then yes.
# TODO(newswangerd): Figure out how to make this one SQL query instead of | ||
# performing N queries for each permission |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
missing_roles = set(roles) - set(Role.objects.filter(name__in=roles))
?
645d08c
to
f487da3
Compare
7f66c47
to
ced1f82
Compare
9c0df23
to
294afcd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have recently added guardian piece that will need to get updated, it is run on each deploy of insights mode: https://github.com/ansible/galaxy_ng/blob/master/galaxy_ng/app/management/commands/maintain-pe-group.py
294afcd
to
19eb37c
Compare
✅ Deploy Preview for galaxyng ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
- Replace get_users_with_perms - Replace get_objects_for_user Issue: AAH-1093
- Rename object_roles back to object_permissions for compatibility - Updated tests - Import Roles model from the plugin api - Remove unused settings import - subclass core.Group for Group model - Viewset shim required by pulpcore - Fix gettext CI error - Add locked roles galaxy.group_admin, galaxy.user_admin and updated galaxy.synclist_owner Issue: AAH-1093
Issue: AAH-1093
19eb37c
to
d123723
Compare
/retest |
/retest |
526c89d
to
f853794
Compare
- Added galaxy.content_admin locked role - Updated integration test Issue: AAH-1093
f853794
to
2cb3e6c
Compare
…e-group pe_group - updated tests as needed Issue: AAH-1093
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates look good, I want to do a quick check in an ephemeral env of the partner-engineering group (when the env is available). But the Jira issue should be able to proceed into QE Review.
Issue: AAH-1093
/retest |
@bmclaughlin spinning up an ephemeral env and trying to create a namespace in the UI, I added a group to "Namespace owners" but the POST hit an error:
|
@awcrosby the UI still needs to be updated to work with these changes. We've had to make some breaking changes to this api by removing the ability to add permissions to group/object combinations, since that's no longer supported by pulpcore. |
Brian fixed andrews changes and andrew is out sick and can't approve the pr
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ding group to namespace breaks after ansible/galaxy_ng#1057
This reverts commit d84dee6.
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ding group to namespace breaks after ansible/galaxy_ng#1057
…ect_roles, not object_permissions (#39) * gitignore vim swapfiles * namespaces.addgroup - use object_roles, not object_permissions no object_permissions since ansible/galaxy_ng#1057 * galaxykit groups & roles - add roles, move perms to roles ```diff +galaxykit group role * +galaxykit role * -galaxykit group perm * +galaxykit role perm * ``` * remove client.set_permissions (not sure if unused, or if we just need to change it to call roles.set_permissions instead of groups.set_permissions) * fix regex typo * galaxykit role create: add -p alias for --permissions
No description provided.