mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 02:47:36 -02:30
Merge branch 'devel' of https://github.com/ansible/ansible-tower into wf_rbac_prompt
This commit is contained in:
@@ -2313,7 +2313,6 @@ class WorkflowJobTemplateNodeSerializer(WorkflowNodeBaseSerializer):
|
|||||||
|
|
||||||
class WorkflowJobNodeSerializer(WorkflowNodeBaseSerializer):
|
class WorkflowJobNodeSerializer(WorkflowNodeBaseSerializer):
|
||||||
class Meta:
|
class Meta:
|
||||||
# TODO: workflow_job and job read-only
|
|
||||||
model = WorkflowJobNode
|
model = WorkflowJobNode
|
||||||
fields = ('*', 'job', 'workflow_job',)
|
fields = ('*', 'job', 'workflow_job',)
|
||||||
|
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ class ApiV1RootView(APIView):
|
|||||||
data['activity_stream'] = reverse('api:activity_stream_list')
|
data['activity_stream'] = reverse('api:activity_stream_list')
|
||||||
data['workflow_job_templates'] = reverse('api:workflow_job_template_list')
|
data['workflow_job_templates'] = reverse('api:workflow_job_template_list')
|
||||||
data['workflow_jobs'] = reverse('api:workflow_job_list')
|
data['workflow_jobs'] = reverse('api:workflow_job_list')
|
||||||
|
data['workflow_job_template_nodes'] = reverse('api:workflow_job_template_node_list')
|
||||||
|
data['workflow_job_nodes'] = reverse('api:workflow_job_node_list')
|
||||||
return Response(data)
|
return Response(data)
|
||||||
|
|
||||||
|
|
||||||
@@ -246,16 +248,16 @@ class ApiV1ConfigView(APIView):
|
|||||||
try:
|
try:
|
||||||
from awx.main.task_engine import TaskEnhancer
|
from awx.main.task_engine import TaskEnhancer
|
||||||
license_data = json.loads(data_actual)
|
license_data = json.loads(data_actual)
|
||||||
license_data = TaskEnhancer(**license_data).validate_enhancements()
|
license_data_validated = TaskEnhancer(**license_data).validate_enhancements()
|
||||||
except Exception:
|
except Exception:
|
||||||
# FIX: Log
|
# FIX: Log
|
||||||
return Response({"error": "Invalid License"}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({"error": "Invalid License"}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
# If the license is valid, write it to the database.
|
# If the license is valid, write it to the database.
|
||||||
if license_data['valid_key']:
|
if license_data_validated['valid_key']:
|
||||||
settings.LICENSE = data_actual
|
settings.LICENSE = license_data
|
||||||
settings.TOWER_URL_BASE = "{}://{}".format(request.scheme, request.get_host())
|
settings.TOWER_URL_BASE = "{}://{}".format(request.scheme, request.get_host())
|
||||||
return Response(license_data)
|
return Response(license_data_validated)
|
||||||
|
|
||||||
return Response({"error": "Invalid license"}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({"error": "Invalid license"}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
@@ -2625,7 +2627,6 @@ class WorkflowJobTemplateNodeList(ListCreateAPIView):
|
|||||||
serializer_class = WorkflowJobTemplateNodeListSerializer
|
serializer_class = WorkflowJobTemplateNodeListSerializer
|
||||||
new_in_310 = True
|
new_in_310 = True
|
||||||
|
|
||||||
|
|
||||||
class WorkflowJobTemplateNodeDetail(RetrieveUpdateDestroyAPIView):
|
class WorkflowJobTemplateNodeDetail(RetrieveUpdateDestroyAPIView):
|
||||||
|
|
||||||
model = WorkflowJobTemplateNode
|
model = WorkflowJobTemplateNode
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ which users can administer the organization.
|
|||||||
users who will be added to the organization. Strings in the format
|
users who will be added to the organization. Strings in the format
|
||||||
"/<pattern>/<flags>" will be interpreted as regular expressions and may also
|
"/<pattern>/<flags>" will be interpreted as regular expressions and may also
|
||||||
be used instead of string literals; only "i" and "m" are supported for flags.
|
be used instead of string literals; only "i" and "m" are supported for flags.
|
||||||
- remove_admins: True/False. Defaults to False.
|
- remove_admins: True/False. Defaults to True.
|
||||||
If True, a user who does not match will be removed from the organization's
|
If True, a user who does not match will be removed from the organization's
|
||||||
administrative list.
|
administrative list.
|
||||||
- users: None, True/False, string or list/tuple of strings. Same rules apply
|
- users: None, True/False, string or list/tuple of strings. Same rules apply
|
||||||
as for admins.
|
as for admins.
|
||||||
- remove_users: True/False. Defaults to False. Same rules as apply for
|
- remove_users: True/False. Defaults to True. Same rules as apply for
|
||||||
remove_admins.\
|
remove_admins.\
|
||||||
''')
|
''')
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ for each team's membership, where each can contain the following parameters:
|
|||||||
Strings in the format "/<pattern>/<flags>" will be interpreted as regular
|
Strings in the format "/<pattern>/<flags>" will be interpreted as regular
|
||||||
expressions and may also be used instead of string literals; only "i" and "m"
|
expressions and may also be used instead of string literals; only "i" and "m"
|
||||||
are supported for flags.
|
are supported for flags.
|
||||||
- remove: True/False. Defaults to False. If True, a user who does not match
|
- remove: True/False. Defaults to True. If True, a user who does not match
|
||||||
the rules above will be removed from the team.\
|
the rules above will be removed from the team.\
|
||||||
''')
|
''')
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ register(
|
|||||||
' If a string or list of strings, specifies the group DN(s). '
|
' If a string or list of strings, specifies the group DN(s). '
|
||||||
'User will be added as a team member if the user is a member of '
|
'User will be added as a team member if the user is a member of '
|
||||||
'ANY of these groups.\n'
|
'ANY of these groups.\n'
|
||||||
'- remove: True/False. Defaults to False. If True, a user who is '
|
'- remove: True/False. Defaults to True. If True, a user who is '
|
||||||
'not a member of the given groups will be removed from the team.'),
|
'not a member of the given groups will be removed from the team.'),
|
||||||
category=_('LDAP'),
|
category=_('LDAP'),
|
||||||
category_slug='ldap',
|
category_slug='ldap',
|
||||||
|
|||||||
Reference in New Issue
Block a user