2651 Commits

Author SHA1 Message Date
Elyézer Rezende
37218e1695 Enforce single owner field when serializing creds
The CredentialSerializerCreate expect a single owner field according to
its help text but was not validating that. This makes it validate for a
single owner field when creating a Credential.
2020-06-21 11:31:35 -04:00
Rebeccah
118e1b8df1
removing memchache mentions in comments
remove memcached folder as it is no longer needed, also address a couple grammatical errors
2020-06-18 15:52:59 -04:00
Marliana Lara
6ed611c27c
Add inventory source subforms 2020-06-17 14:16:03 -04:00
Seth Foster
e768d5e7fc
Make all_parents_must_converge settable when creating node
When targeting, ../workflow_job_templates/id#/workflow_nodes/ endpoint,
user could not set all_parents_must_converge to true.

awx issue #7063
2020-06-08 17:51:15 -04:00
Christian Adams
19ccb5e213 Mark job_explanation strings after they are read from the db
- For strings that need to be translated, but are saved in the db:
   * They must be marked for translation using gettext_noop() to be
   translated.
   * And must also be marked for translation with _() when read from db
   and shown to the user.
   * [Ref]: https://docs.djangoproject.com/en/3.0/topics/i18n/translation/#marking-strings-as-no-op
2020-05-15 22:50:50 -04:00
Alex Corey
09e72bc0ae Adds Teams Access List and tests 2020-05-12 11:38:11 -04:00
softwarefactory-project-zuul[bot]
63fec77f82
Merge pull request #6912 from AlanCoding/ignored_but_not_forgotten
Remove defunct entry from view method return tuple

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-05-04 16:23:55 +00:00
AlanCoding
d54e5e5ed8
Remove defunct entry from view method return tuple 2020-05-01 14:10:14 -04:00
Ryan Petrello
2997911fd4
Merge branch 'downstream' into devel 2020-05-01 13:53:30 -04:00
Ryan Petrello
bf65b40241
only sanitize project update events for the scm modules
these are the only modules in the project update playbook that actually
utilize the SCM URL (which is what potentially contains sensitive data)
2020-05-01 11:39:46 -04:00
Ryan Petrello
18607107a7
remove the deprecated extra_credentials endpoints 2020-04-30 10:22:02 -04:00
Ryan Petrello
edd9972435
include the AWX version as a header in all responses 2020-04-22 12:07:31 -04:00
Christian Adams
a899a147e1 Fix new flake8 from pyflakes 2.2.0 release 2020-04-20 09:50:50 -04:00
Christian Adams
d31c528257 Fix Logging settings "Test" button functionality 2020-04-13 11:43:59 -04:00
Ryan Petrello
0bf1116ef8
properly respect REFRESH_TOKEN_EXPIRE_SECONDS when generating new tokens
see: https://github.com/ansible/awx/issues/6630
see: https://github.com/jazzband/django-oauth-toolkit/issues/746
2020-04-07 11:34:01 -04:00
softwarefactory-project-zuul[bot]
9a91c0bfb2
Merge pull request #6572 from AlanCoding/approval_identifier
Allow setting identifier for approval nodes

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
             https://github.com/beeankha
2020-04-06 13:39:39 +00:00
softwarefactory-project-zuul[bot]
99511de728
Merge pull request #6554 from wenottingham/this-may-be-what-alan-suggested
Allow disassociating orphaned users from credentials

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-04-03 21:26:49 +00:00
softwarefactory-project-zuul[bot]
2aa29420ee
Merge pull request #6565 from chrismeyersfsu/fix-schema_workflow_identifier
static identifier in OPTIONS response for workflow job template node

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-04-03 21:20:37 +00:00
AlanCoding
dbe3863b04
Allow setting identifier for approval nodes 2020-04-03 15:33:57 -04:00
softwarefactory-project-zuul[bot]
29b567d6e1
Merge pull request #6550 from ryanpetrello/fix-minutely-hourly
remove the limitation on (very) old DTSTART values for schedules

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-04-03 18:32:15 +00:00
Bill Nottingham
4f3213715e Allow disassociating any user from a credential role.
This is preventing removing roles from users no longer in the organization.
2020-04-03 13:39:28 -04:00
chris meyers
a26df3135b static identifier in docs
* OPTIONS response descritpion for workflow job template node identifier
value was an ever changing uuid4(). This is telling the user the wrong
thing. We can not know what uuid4() is going to be in the docs. Instead,
for the OPTIONS response description, tell the user the form that the
uuid4() takes, ie. xxx-xxxx...
* Note that the API browser still populates a uuid4 for the user when it
generates the sample POST data. This is nice.
2020-04-03 13:12:49 -04:00
Ryan Petrello
6bd5053ae8
remove the limitation on (very) old DTSTART values for schedules 2020-04-03 10:59:35 -04:00
Ryan Petrello
8b00b8c9c2
remove deprecated legacy manual inventory source support
see: https://github.com/ansible/awx/issues/6309
2020-04-03 10:54:43 -04:00
softwarefactory-project-zuul[bot]
83721ff9a8
Merge pull request #6438 from jakemcdermott/6433-fix-org-team-rbac-save-api
Identify user-only object roles

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-27 16:35:56 +00:00
Jake McDermott
579648a017
Identify user-only organization roles
Organization participation roles (admin, member) can't be assigned to a
team. Add a field to the object roles so the ui can know not to display
them for team role selection.
2020-03-27 11:12:39 -04:00
softwarefactory-project-zuul[bot]
c4ed9a14ef
Merge pull request #6451 from jbradberry/related-webhook-credential-link
Optionally add the webhook_credential link to related

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-27 14:38:25 +00:00
softwarefactory-project-zuul[bot]
6bc97158fe
Merge pull request #6443 from ryanpetrello/summary-fields-perf-note
clarify some API documentation on summary_fields

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-26 21:17:48 +00:00
Jeff Bradberry
6b3befcb94 Optionally add the webhook_credential link to related
on JTs and WFJTs.
2020-03-26 16:07:14 -04:00
Ryan Petrello
90d35f07f3
clarify some documentation on summary_fields 2020-03-26 14:54:28 -04:00
Jake McDermott
e17c93ecd7
Don't allow blank adhoc command module names 2020-03-25 13:11:30 -04:00
softwarefactory-project-zuul[bot]
0f7a4b384b
Merge pull request #6386 from jbradberry/awxkit-api-endpoints
Awxkit api endpoints

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-25 15:33:32 +00:00
AlanCoding
5e595caf5e
Add workflow node identifier
Generate new modules WFJT and WFJT node
Touch up generated syntax, test new modules

Add utility method in awxkit

Fix some issues with non-name identifier in
  AWX collection module_utils

Update workflow docs for workflow node identifier

Test and fix WFJT modules survey_spec
Plug in survey spec for the new module
Handle survey spec idempotency and test

add associations for node connections
Handle node credential prompts as well

Add indexes for new identifier field

Test with unicode dragon in name
2020-03-23 22:00:00 -04:00
Jeff Bradberry
1e48d773ae Add job_templates to the set of related endpoints for organizations 2020-03-23 14:33:40 -04:00
chris meyers
b58c71bb74
remove broadcast websockets view 2020-03-18 16:10:20 -04:00
Ryan Petrello
1caa2e0287
work around a limitation in postgres notify to properly support copying
postgres has a limitation on its notify message size (8k), and the
messages we generate for deep copying functionality easily go over this
limit; instead of passing a giant nested data structure across the
message bus, this change makes it so that we temporarily store the JSON
structure in memcached, and look it up from *within* the task

see: https://github.com/ansible/tower/issues/4162
2020-03-18 16:10:20 -04:00
chris meyers
093d204d19
fix flake8 2020-03-18 16:10:19 -04:00
chris meyers
d6594ab602
add broadcast websocket metrics
* Gather brroadcast websocket metrics and push them into redis every
configurable seconds.
* Pop metrics from redis in web view layer to display via the api on
demand
2020-03-18 16:10:18 -04:00
softwarefactory-project-zuul[bot]
1e780aad38
Merge pull request #5726 from AlanCoding/jt_org_2020
Add read-only organization field to job templates

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-16 20:03:47 +00:00
Ryan Petrello
27b48fe55b
make User.last_login read_only=True in its serializer 2020-03-13 12:53:40 -04:00
AlanCoding
7d0b207571
Organization on JT as read-only field
Set JT.organization with value from its project

Remove validation requiring JT.organization

Undo some of the additional org definitions in tests

Revert some tests no longer needed for feature

exclude workflow approvals from unified organization field

revert awxkit changes for providing organization

Roll back additional JT creation permission requirement

Fix up more issues by persisting organization field when project is removed

Restrict project org editing, logging, and testing

Grant removed inventory org admin permissions in migration

Add special validate_unique for job templates
  this deals with enforcing name-organization uniqueness

Add back in special message where config is unknown
  when receiving 403 on job relaunch

Fix logical and performance bugs with data migration

within JT.inventory.organization make-permission-explicit migration

remove nested loops so we do .iterator() on JT queryset

in reverse migration, carefully remove execute role on JT
  held by org admins of inventory organization,
  as well as the execute_role holders

Use current state of Role model in logic, with 1 notable exception
  that is used to filter on ancestors
  the ancestor and descentent relationship in the migration model
    is not reliable
  output of this is saved as an integer list to avoid future
    compatibility errors

make the parents rebuilding logic skip over irrelevant models
  this is the largest performance gain for small resource numbers
2020-03-12 15:45:46 -04:00
AlanCoding
daa9282790
Initial (editable) pass of adding JT.organization
This is the old version of this feature from 2019
  this allows setting the organization in the data sent
  to the API when creating a JT, and exposes the field
  in the UI as well

Subsequent commit changes the field from editable
  to read-only, but as of this commit, the machinery
  is not hooked up to infer it from project
2020-03-12 15:45:46 -04:00
AlanCoding
5c331934e2
Fix server error creating smart inventories 2020-03-10 22:00:31 -04:00
Jeff Bradberry
d849e81891 Show API choice field metadata more correctly for null vs '' 2020-03-05 17:10:59 -05:00
softwarefactory-project-zuul[bot]
73b33e1435
Merge pull request #6116 from AlanCoding/early_error
Fail on launch for scenario where job cannot run

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-04 15:19:22 +00:00
Ryan Petrello
6207dad226
fix broken grafana notifications
since the custom notification template refactor, grafana notification
support has been broken; this is largely because grafana functions more
like the webhooks, and needs to send JSON in its notification body

see: https://github.com/ansible/awx/issues/6137
2020-03-03 12:44:28 -05:00
AlanCoding
07807c2dec
Fail on launch for scenario where job cannot run 2020-03-02 13:14:03 -05:00
Alan Rominger
768280c9ba [last PR stuff] + Add warning if configs specified in 2 params (#5)
* Lean on API validation for tower_inventory_source arg errors

used for
 - validating needed credential is given
 - missing source_project for scm sources

* Add warning when config is specified in 2 places

Fix up unit tests, address multiple comments re: backwards compatibility, redundant methods, etc.

Update new_name and variables parameters, update unit tests
2020-02-26 09:26:55 -05:00
Jeff Bradberry
d0bec97bbb Adjust the logic that renders fields with choices on an API Options call
accounting for the case where blank or null is allowed.

Refs #5099
2020-02-24 10:17:38 -05:00
Ryan Petrello
487343a022
include credential type details in the webhook credential summary field
see: https://github.com/ansible/awx/issues/5882
2020-02-11 10:51:07 -05:00