Commit Graph

35 Commits

Author SHA1 Message Date
AlanCoding
ac474e2108 Fix RBAC loose items from reversed decision on JT org permissions 2020-04-02 10:17:04 -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
Ryan Petrello
4e6b0e1580 clean up old v2 versioning in API tests 2019-08-22 15:14:06 -04:00
Ryan Petrello
6da445f7c0 remove /api/v1 and deprecated credential fields 2019-06-06 12:23:00 -04:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
AlanCoding
8965f1934e fix bug with relaunching with changed JT 2018-10-25 11:45:47 -04:00
Wayne Witzel III
70a97ce998 Update test to reflect needing job_template_admin_role 2018-07-09 12:17:34 -04:00
Wayne Witzel III
3411389d00 Added JobTemplate ownership change test 2018-04-05 11:00:13 -04:00
AlanCoding
992d7831b1 add test for ScheduleAccess prompts 2018-02-21 14:11:55 -05:00
Wayne Witzel III
fbece6bdde Updating and adding tests for new RBAC roles 2018-02-10 02:52:26 +00:00
AlanCoding
dfc154ed95 allow no-op case for vault_credential 2017-12-01 10:29:23 -05:00
AlanCoding
1481a62b23 modify JT access tests to reflect new vault_credential reality 2017-11-21 08:40:04 -05:00
Ryan Petrello
28ce9b700e replace all Job/JT relations with a single M2M credentials relation
Includes backwards compatibility for now-deprecated .credential,
.vault_credential, and .extra_credentials

This is a building block for multi-vault implementation and Alan's saved
launch configurations (both coming soon)

see: https://github.com/ansible/awx/issues/352
see: https://github.com/ansible/awx/issues/169
2017-11-14 12:49:12 -05:00
AlanCoding
0b617d7538 treat vault_credential same as credential for JT launch 2017-08-02 08:24:24 -04:00
AlanCoding
c6a3a7cc34 JT RBAC edits for extra_credentials and vault_credential 2017-05-12 17:13:58 -04:00
Wayne Witzel III
11eb99820d Initial pass of removing RBAC deprecated fields and Permission 2017-05-02 22:38:34 -04:00
Ryan Petrello
95ea370e5e add API versioning for /api/v2/ 2017-03-30 15:11:12 -04:00
AlanCoding
6b45aa758c fix special case where orphan JTs can not be edited by system admins in UI 2017-02-16 14:48:20 -05:00
AlanCoding
e5a8eb95b2 fix bugs with system auditors and orphan JTs 2017-02-07 09:18:23 -05:00
AlanCoding
b0cf05e9c7 Lower scheduling access requirement to execute 2017-01-04 16:53:23 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
AlanCoding
2ddda56f09 expand check_related to polymorphic related fields 2016-11-05 11:01:59 -04:00
Aaron Tan
2be5d2f23f Unit test added. 2016-10-03 17:32:43 -04:00
Wayne Witzel III
87ffded774 renaming Credential.owner_role -> Credential.admin_role 2016-06-24 16:55:07 -04:00
AlanCoding
a431f16953 job template creation to require use_role, include network creds 2016-06-10 10:58:27 -04:00
AlanCoding
f695caf1ac auto associate JT creator with admin_role 2016-05-23 14:56:23 -04:00
Akita Noek
acc49bbbef Fixed up JT migration tests 2016-05-12 13:46:13 -04:00
Akita Noek
6427526686 Updated JT migration tests to be more correct
This test was passing before because we were erroneously making all
users organization auditors, which gave users read access to all JT's
under the org.
2016-04-29 15:34:54 -04:00
Wayne Witzel III
ff3be050fa test fixes and read_role 2016-04-15 11:56:08 -04:00
Wayne Witzel III
82b72f99ca add rbac migration logging and reduce memory consumption 2016-03-29 17:16:26 -04:00
Akita Noek
9146b29770 Fix up some project multi-org -> single-org fallout 2016-03-14 15:31:05 -04:00
Wayne Witzel III
5b70f29a39 Fix migration tests to use new deprecated fields 2016-03-14 11:57:05 -04:00
Wayne Witzel III
5306eaa98c more access tests and a Makefile driveby 2016-02-16 21:04:33 -05:00
Akita Noek
243b78ee25 Job template migration and migration tests 2016-02-15 11:48:17 -05:00