Commit Graph

194 Commits

Author SHA1 Message Date
chris meyers
87de0cf0b3 flake8, pytest, license fixes 2020-03-18 16:10:20 -04:00
chris meyers
c8eeacacca POC channels 2 2020-03-18 16:10:12 -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
3bbce18173 Remove computed fields artifacts no longer used
Remove deleted field from notification payload
2020-02-04 20:23:37 -05:00
Ryan Petrello
0f0d9ba00d send inv computed tasks *after* commit to avoid a race condition 2020-01-15 14:14:26 -05:00
Ryan Petrello
568606d2c8 remove computed inventory fields from Host and Group 2020-01-14 16:37:16 -05:00
Ryan Petrello
306f504fb7 optimize the callback receiver to buffer writes on high throughput
additionaly, optimize away several per-event host lookups and
changed/failed propagation lookups

we've always performed these (fairly expensive) queries *on every event
save* - if you're processing tens of thousands of events in short
bursts, this is way too slow

this commit also introduces a new command for profiling the insertion
rate of events, `awx-manage callback_stats`

see: https://github.com/ansible/awx/issues/5514
2020-01-14 12:04:26 -05:00
Seth Foster
b6ffde75ef check expired sessions only if User exists
- Indent rest of code into the conditional
  that checks for expired sessions of that User
- If user doesn't exist, no need to check
2019-09-27 12:31:10 -04:00
Seth Foster
94fa745859 removed duplicate import of User 2019-09-27 11:47:44 -04:00
Seth Foster
c94ebba0b3 Saving user session checks if User exists
- Check that model User object exists with id=user_id
  before attempting to save to database
- UserSessionMembership saves to the database using
  foreign key, User
- However, User with matching id might not exist if
  browser sends request with stale cookies
- Change made in regards to issue #4334
2019-09-27 10:52:53 -04:00
beeankha
8b23ff71b4 Update/add more functional tests 2019-08-27 15:38:12 -04:00
Ryan Petrello
dd89e46ee6 change up a few activity stream and approval drawer issues 2019-08-27 15:36:32 -04:00
beeankha
5f82754a3f Clean up RBAC code 2019-08-27 15:36:22 -04:00
beeankha
296b4e830b Add more RBAC for approval nodes 2019-08-27 15:36:21 -04:00
beeankha
3357c96774 Enable deletion of orphaned approval nodes
Update serializer to include workflow approval for activity stream
2019-08-27 15:36:19 -04:00
beeankha
64c94d478d Add more RBAC, filter out AJT/AJs from unified jobs lists
Comment out placeholder in serializer
2019-08-27 15:36:17 -04:00
beeankha
453e142635 Fix UJT-related error, add notification placeholders 2019-08-27 15:35:43 -04:00
beeankha
294d6551b9 Polishing up work on new endpoint 2019-08-27 15:30:48 -04:00
beeankha
320284267c Add new endpoint for creation of approval nodes 2019-08-27 15:30:47 -04:00
AlanCoding
1223148116 Avoid unnecessary user get expiring session memberships 2019-05-17 14:05:17 -04:00
AlanCoding
9c71204435 show activity stream entry for system auditor association 2019-04-16 15:59:04 -04:00
Ryan Petrello
9bebf3217e remove usage of import * and enforce F405 in our linter
import * is a scourge upon the earth
2019-02-13 17:10:33 -05:00
Ryan Petrello
daeeaf413a clean up unnecessary usage of the six library (awx only supports py3) 2019-01-25 00:19:48 -05:00
Ryan Petrello
f223df303f convert py2 -> py3 2019-01-15 14:09:01 -05:00
AlanCoding
1adeb833fb clean up unwanted data in activity stream of nodes 2018-11-28 10:41:32 -05:00
AlanCoding
5b274cfc2a include survey_spec in activity stream 2018-11-19 12:07:48 -05:00
Ryan Petrello
49f4ed10ca include M2M labels and credentials in Job creation activity stream 2018-11-14 10:36:01 -05:00
AlanCoding
658f87953e coalesce data without setting 2018-11-09 14:00:45 -05:00
AlanCoding
5562e636ea Coalesce host and group A.S. deletion entries 2018-11-09 13:58:31 -05:00
adamscmRH
1bc83b488b hide client_secret from API 2018-08-09 11:27:39 -04:00
Yunfan Zhang
f9309c9cd9 Add instance groups to activity streams.
Signed-off-by: Yunfan Zhang <yz322@duke.edu>
2018-07-31 11:01:29 -04:00
Ryan Petrello
b2cdf82b78 make settings.SESSIONS_PER_USER work
see: https://github.com/ansible/tower/issues/2209
2018-06-27 12:09:56 -04:00
AlanCoding
239c60a2bd fix tracebacks when running migrations 2018-06-04 07:35:35 -04:00
AlanCoding
b7e9bda6cf track prior organization_id by base model prior values tore
Also fix bug where unified pointers were counted in
the prior values store
2018-05-23 08:54:03 -04:00
Ryan Petrello
05b0c5ec6f censor OAuth tokens from activity stream deletion records
see: https://github.com/ansible/tower/issues/1772
2018-05-15 09:16:37 -04:00
AlanCoding
6d7f772e98 avoid DB action in signal, confusing logs 2018-05-04 08:12:40 -04:00
Alan Rominger
900ea14883 Merge pull request #1286 from AlanCoding/remove_user_roles
Remove the "user admin role" entirely
2018-04-16 07:33:55 -04:00
adamscmRH
dcb6ca33a5 fix id for app in act_stream 2018-04-13 14:37:19 -04:00
AlanCoding
4995ee7a60 remove admin_role for users 2018-04-12 13:18:49 -04:00
Wayne Witzel III
99fb0fa4cd Extract update_role_parentage_for_instance 2018-04-06 15:19:41 -04:00
Wayne Witzel III
81fe778676 Collect roles and update parentage instead of saving JT 2018-04-06 13:35:24 -04:00
Wayne Witzel III
0bd9919108 Make use of callback explicitly for Project and Inventory 2018-04-05 11:05:48 -04:00
Wayne Witzel III
3411389d00 Added JobTemplate ownership change test 2018-04-05 11:00:13 -04:00
Wayne Witzel III
524343870b Added Project & Inventory signals for JobTemplate RBAC 2018-04-05 09:46:03 -04:00
Christian Adams
2b7ad578d5 Merge pull request #1121 from rooftopcellist/organization_based_permission
Organization based permission
2018-04-04 10:39:40 -04:00
AlanCoding
a52b22ffdf delete user role on deletion of a user 2018-04-03 14:31:56 -04:00
adamscmRH
e9a128138a add org-app endpoint & permissions 2018-04-03 08:58:53 -04:00
AlanCoding
48112f2c56 prevent modified from showing up in activity stream 2018-03-29 08:37:20 -04:00
HNKNTA
7ddbc49568 Fixed parentless function
Signed-off-by: HNKNTA <hnknta@gmail.com>
2018-03-25 18:33:46 +03:00