Commit Graph

1043 Commits

Author SHA1 Message Date
Ryan Petrello
ef211a4dc8 add a missing Location header on HTTP 201 in a few places 2018-07-06 11:34:48 -04:00
Ryan Petrello
d1f5485b96 properly check read permissions in GET /api/v2/wfjt/N/copy/
see: https://github.com/ansible/tower/issues/2323
2018-07-03 15:15:00 -04:00
Alan Rominger
6f63c7ba38 Merge pull request #2346 from AlanCoding/no_controller_node
No controller node field for project updates
2018-06-29 14:52:34 -04:00
AlanCoding
8ae979908c Enforce unified list field consistency
Discovered via bug: controller_node field present in
project update list but not in detail view

Added tests to assert that "unified" list serializer
produces same fields as the ordinary serializer,
for unified jobs & unified JTs

Added test to check that list serializers do differ
from detail serializer except for allowed differences

Added test to check that list serializers are applied
correctly - only on list views, and that detail views,
likewise, do not use list serializers

Fix the many many bugs discovered by these new
testing mechanisms
2018-06-29 14:03:52 -04:00
Ryan Petrello
d52fa377d8 remove unnecessary CSRF exemptions 2018-06-28 09:35:01 -04:00
Ryan Petrello
504dfd32ee properly enforce CSRF validation
see: https://github.com/ansible/tower/issues/2339
2018-06-27 21:09:26 -04:00
Jake McDermott
9137b4acef Merge pull request #2114 from jakemcdermott/job-results/host-counts
reduce the minimum number of http requests required to load job details from 7 to 3
2018-06-11 18:19:14 -04:00
Yunfan Zhang
1bc1a6f63f Disallow HTTP update methods in job_detail API endpoint. 2018-06-11 14:47:43 -04:00
Jake McDermott
92ae09e163 add host_status_counts and playbook_counts to project update details 2018-06-08 22:27:41 -04:00
Yunfan Zhang
1a3ab7d487 Fix exception format in project_update_stdout.
Signed-off-by: Yunfan Zhang <yz322@duke.edu>
2018-06-08 15:42:00 -04:00
Jake McDermott
f8f59c8c8c add host_status, play, and task counts to job details 2018-06-06 18:02:31 -04:00
Christian Adams
b065593e49 Merge pull request #1932 from rooftopcellist/validate_scope
Validate scope
2018-05-25 10:49:02 -04:00
adamscmRH
bb6a4f6964 fix oauth urls & rename for clarity 2018-05-24 15:32:48 -04:00
adamscmRH
3d5605f4b5 refactor & purge cruft 2018-05-24 14:33:27 -04:00
Ryan Petrello
63f089c712 allow any authenticated user to access the schedule preview API endpoint
see: https://github.com/ansible/tower/issues/1939
2018-05-23 16:51:58 -04:00
Ryan Petrello
51f66b8c0a filter /api/v2/users/N/tokens/ to only show tokens for _that_ user
see: https://github.com/ansible/tower/issues/1773
2018-05-17 15:44:35 -04:00
Ryan Petrello
53ef9ed288 never convert ANSI codes to HTML for format /stdout/?format=json
see: https://github.com/ansible/awx/issues/1863
2018-05-16 11:20:55 -04:00
Alan Rominger
64fed4d360 Merge pull request #1768 from AlanCoding/all_the_search_fields
Enforce consistently setting view search_fields
2018-05-15 08:32:44 -04:00
Ryan Petrello
5b55e3cb2b fix a bug that prevented JT admins from editing custom virtualenvs
see: https://github.com/ansible/tower/issues/1754
2018-05-14 14:12:22 -04:00
AlanCoding
ec7f1c2540 enforce consistently setting view search_fields 2018-05-14 10:12:49 -04:00
Ryan Petrello
6c0af2ef57 Merge pull request #1667 from ryanpetrello/and-you-get-a-timezone
change timezone behavior slightly for Schedule.rrule to make things simpler for UI folks
2018-05-11 09:55:23 -04:00
Ryan Petrello
00ae91dace slight cleanup and refactor of Schedule.timezone property 2018-05-08 08:28:51 -04:00
Ryan Petrello
fbe2391b86 provide the timezone so that the UI doesn't have to
this will also ensure that UI doesn't use a different front end library
that will yield different results than the underlying Python code
2018-05-07 13:00:01 -07:00
AlanCoding
ec1e94376c correctly check credential permission on WFJT copy 2018-05-03 07:42:59 -04:00
Matthew Jones
062329f56e Protect isolated and control groups from api deletion
Isolated and Control groups are managed strictly from the standalone
setup playbook installer and should not be directly managable from the
api. Especially true since you can't assign or create isolated groups
from within the API itself.

In the future this may change but allowing this in the API could leave
the system in a bad state.
2018-04-20 15:30:13 -04:00
Alan Rominger
a7ecc306e1 Merge pull request #1328 from AlanCoding/job_del_protect
make deletion protection mixin work with inventories
2018-04-19 13:18:31 -04:00
Chris Meyers
df298cec36 Merge pull request #1374 from chrismeyersfsu/fix-proj_update_redact
redact project update urls when downloading stdout
2018-04-19 09:09:24 -04:00
chris meyers
09d5645b90 redact project update urls when downloading stdout
* For ProjectUpdate jobs. Redact potentially sensitive urls from the
output.
2018-04-18 16:45:55 -04:00
Alan Rominger
18a7e86e0c Merge pull request #1175 from AlanCoding/protect_hosts
Add deletion protection to hosts
2018-04-18 10:06:05 -04:00
AlanCoding
d234b71fd8 fix API browser server error on relaunch 2018-04-16 15:03:44 -04:00
AlanCoding
4995ee7a60 remove admin_role for users 2018-04-12 13:18:49 -04:00
AlanCoding
0c224df9ad make deletion protection mixin work with inventories 2018-04-11 07:54:09 -04:00
AlanCoding
f369e3ba0f handle 400 error creating sys auditor 2018-04-09 08:37:54 -04:00
AlanCoding
5a380b4437 deprecate jobs creation via sublist 2018-04-06 12:59:53 -04:00
AlanCoding
02b7424b29 check for existence and type of all spec items 2018-04-04 16:39:36 -04:00
adamscmRH
e9a128138a add org-app endpoint & permissions 2018-04-03 08:58:53 -04:00
AlanCoding
dd8acb70be add deletion protection to hosts 2018-04-02 13:21:22 -04:00
chris meyers
bf6412ea06 fix api browser endpoint name
* Endpoint exposes all jobs associated with an Instance. This is what we
want. Align the endpoint description with this behavior by removing the
word running.
2018-03-28 16:24:19 -04:00
AlanCoding
5fe63894d5 new credential passwords system on relaunch 2018-03-23 12:44:52 -04:00
chris meyers
305ef6fa7e do not allow tower group delete or name change
* DO allow policy changes and other attribute changes
2018-03-22 08:05:06 -04:00
AlanCoding
69eccd3130 move ACTIVE_STATES to constants 2018-03-16 10:31:41 -04:00
AlanCoding
7881c921ac block deletion of resources w unprocessed events 2018-03-16 10:14:28 -04:00
chris meyers
1f7506e982 prevent tower group delete and update
* related to https://github.com/ansible/ansible-tower/issues/7931
* The Tower Instance group is special. It should always exist, so
prevent any delete to it.
* Only allow super users to associate/disassociate instances the 'tower'
instance group.
* Do not allow fields of tower instance group to be changed.
2018-03-15 15:23:06 -04:00
Chris Meyers
2640ef8b1c Merge pull request #1536 from chrismeyersfsu/fix-protect_instance_groups
prevent instance group delete if running jobs
2018-03-15 14:57:45 -04:00
chris meyers
5d5d8152c5 prevent instance group delete if running jobs
* related to https://github.com/ansible/ansible-tower/issues/7936
2018-03-15 14:25:49 -04:00
AlanCoding
04a27d5b4d Namechange events_processed -> event_processing_finished
from PR review, also adding tests to assert that the
value is passed from the stdout_handle to the UnifiedJob
object on finalization of job run in tasks.py
2018-03-14 07:53:04 -04:00
AlanCoding
b803a6e557 Track emitted events on model 2018-03-14 07:53:02 -04:00
Alan Rominger
dcae4f65b5 Merge pull request #1330 from AlanCoding/capable_of_anything
New copy fields, clean up user_capabilities logic
2018-03-13 12:05:45 -04:00
Bill Nottingham
fb05eecee0 Add some periods. 2018-03-09 17:23:52 -05:00
Ryan Petrello
397b9071a6 properly categorize OAuth2 endpoints for swagger autogen 2018-03-09 15:07:50 -05:00