mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
Merge branch 'devel' of https://github.com/ansible/ansible-tower into wf_rbac_prompt
This commit is contained in:
commit
b2fb7694dc
@ -2313,7 +2313,6 @@ class WorkflowJobTemplateNodeSerializer(WorkflowNodeBaseSerializer):
|
||||
|
||||
class WorkflowJobNodeSerializer(WorkflowNodeBaseSerializer):
|
||||
class Meta:
|
||||
# TODO: workflow_job and job read-only
|
||||
model = WorkflowJobNode
|
||||
fields = ('*', 'job', 'workflow_job',)
|
||||
|
||||
|
||||
@ -145,6 +145,8 @@ class ApiV1RootView(APIView):
|
||||
data['activity_stream'] = reverse('api:activity_stream_list')
|
||||
data['workflow_job_templates'] = reverse('api:workflow_job_template_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)
|
||||
|
||||
|
||||
@ -246,16 +248,16 @@ class ApiV1ConfigView(APIView):
|
||||
try:
|
||||
from awx.main.task_engine import TaskEnhancer
|
||||
license_data = json.loads(data_actual)
|
||||
license_data = TaskEnhancer(**license_data).validate_enhancements()
|
||||
license_data_validated = TaskEnhancer(**license_data).validate_enhancements()
|
||||
except Exception:
|
||||
# FIX: Log
|
||||
return Response({"error": "Invalid License"}, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
# If the license is valid, write it to the database.
|
||||
if license_data['valid_key']:
|
||||
settings.LICENSE = data_actual
|
||||
if license_data_validated['valid_key']:
|
||||
settings.LICENSE = license_data
|
||||
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)
|
||||
|
||||
@ -2625,7 +2627,6 @@ class WorkflowJobTemplateNodeList(ListCreateAPIView):
|
||||
serializer_class = WorkflowJobTemplateNodeListSerializer
|
||||
new_in_310 = True
|
||||
|
||||
|
||||
class WorkflowJobTemplateNodeDetail(RetrieveUpdateDestroyAPIView):
|
||||
|
||||
model = WorkflowJobTemplateNode
|
||||
|
||||
@ -44,12 +44,12 @@ which users can administer the organization.
|
||||
users who will be added to the organization. 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" 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
|
||||
administrative list.
|
||||
- users: None, True/False, string or list/tuple of strings. Same rules apply
|
||||
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.\
|
||||
''')
|
||||
|
||||
@ -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
|
||||
expressions and may also be used instead of string literals; only "i" and "m"
|
||||
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.\
|
||||
''')
|
||||
|
||||
@ -434,7 +434,7 @@ register(
|
||||
' 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 '
|
||||
'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.'),
|
||||
category=_('LDAP'),
|
||||
category_slug='ldap',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user