-
Notifications
You must be signed in to change notification settings - Fork 54
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
add permission on operation #803
Conversation
remove "version" flag
@@ -1,6 +1,4 @@ | |||
# add this file to the docker compose execution when developing Squest | |||
version: '3.7' | |||
|
|||
services: |
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.
CHANGELOG Breaking changes does not support docker compose v1 anymore
ContentType = apps.get_model('contenttypes', 'ContentType') | ||
operation_content_type = ContentType.objects.get_for_model(Operation) | ||
|
||
is_admin_operation, _ = Permission.objects.get_or_create(codename="is_admin_operation", content_type=operation_content_type) |
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.
view_admin_operation to stay consistent
@@ -116,6 +115,8 @@ def __str__(self): | |||
@property | |||
def docs(self): | |||
filtered_doc = list() | |||
if self.service is None: |
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.
service shouldn't be None, it should be required in Instance
service_catalog/views/instance.py
Outdated
@@ -1,4 +1,5 @@ | |||
import logging | |||
from gc import enable |
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.
?
"permission": FormUtils.get_default_permission_for_operation(), | ||
}, | ||
{ | ||
"name": "new_service_2", | ||
"description": "a new service 2", | ||
"permission": FormUtils.get_default_permission_for_operation(), | ||
}, | ||
{ | ||
"name": "new_service_3", | ||
"description": "a new service 3" | ||
"description": "a new service 3", | ||
"permission": FormUtils.get_default_permission_for_operation(), |
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.
Three times the same
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.
small changes to do before merge
541d768
to
1a9afb5
Compare
#724