Commit Graph
100 Commits
Author SHA1 Message Date
Akita Noek b25894aae8 New field name fixes 2016-04-15 12:19:06 -04:00
Akita Noek 9f5caa111d Merge branch '11th-hour' of github.com:anoek/ansible-tower into 11th-hour 2016-04-15 12:17:23 -04:00
Akita Noek 859d670fc8 Removed RolePermission stuff for Hosts 2016-04-15 10:59:15 -04:00
Akita Noek 3b2c6747d3 Updated test_rbac_core.py test for RolePermission removal 2016-04-15 10:39:51 -04:00
Akita Noek 6d34ca9d22 Proof of concept hacks for RolePermission elimination 2016-04-15 10:03:50 -04:00
Akita Noek 872ce2f9e8 Merge branch 'ancestor-rebuild-optimization' into 11th-hour 2016-04-14 21:56:43 -04:00
Akita Noek 25f0d65c5f Ancestor rebuild optimization progress 2016-04-14 21:56:10 -04:00
Akita Noek 8887db231b Progress on ripping out RolePermissions 2016-04-14 09:44:20 -04:00
Akita Noek 1d27ddc7d2 Fix bad migration from #1496 2016-04-12 16:50:54 -04:00
Akita Noek caab5b7e20 Merge branch 'migration' into explicit-implicit-parents 2016-04-12 16:31:51 -04:00
Akita Noek ad89491a07 Fixed bad merge 2016-04-12 16:31:11 -04:00
Akita Noek ea3a7ef227 Merge branch 'devel' of github.com:ansible/ansible-tower into migration 2016-04-12 16:30:09 -04:00
Akita Noek a0356afbac Improved code clarity and UI naming for user owner role creation
#1499
2016-04-12 16:11:45 -04:00
Akita Noek c984b33f1e Fix erronous singleton role created for users
Needed to be just a normal role, ie with `name` assigned instead of
`singleton_name`

 Addresses #1499
2016-04-12 15:43:27 -04:00
Akita Noek 1369be8f17 Merge branch 'devel' into explicit-implicit-parents 2016-04-12 15:13:37 -04:00
Akita Noek 29c7ecf6a8 Merge branch 'devel' into migration 2016-04-12 15:12:43 -04:00
Akita Noek 8c917de24d Fix faulty activitystream test
Test assumed that the only entry in activitystream would be related to
the creation of the organization, which in this case was not true, the
most recent being something related to the user object being created or
modified.
2016-04-12 15:03:24 -04:00
Akita Noek 6039ad92e9 Merge branch 'devel' of github.com:ansible/ansible-tower into explicit-implicit-parents 2016-04-12 14:51:30 -04:00
Akita Noek 7b4e7ec5b3 Switch to explicitly stored implicit role parents
Completes #1496
2016-04-12 14:50:52 -04:00
Akita Noek 7e0bfc9831 Use --nomigrations for py.test
This is for two reasons, 1) it's a lot faster when starting from a new
database, and 2) since we do database work within our migrations, it
doesn't actually work within py.test, which is either a bug in
pytest-djano, or a horrible behavior of pytest-django.
2016-04-12 14:32:10 -04:00
Akita Noek b77d8dab47 flake8 fixes
Signed-off-by: Akita Noek <anoek@ansible.com>
2016-04-12 12:04:39 -04:00
Akita Noek e9aff8d67d Moved necessary add field migration to exist prior to dependent implicit role field which references the field 2016-04-12 11:40:17 -04:00
Akita Noek 74d86859f1 Fix project migration when project has exactly one org 2016-04-12 11:40:17 -04:00
Akita Noek 5f8e7bbf55 Replace user.admin_role usage with manual version that works in migrations 2016-04-12 11:40:17 -04:00
Akita Noek 86e29221d5 Fixed missing orgfunc usage to resolve organization during credential migration 2016-04-12 11:40:17 -04:00
Akita Noek 59b6ed3b9c Update rbac schema migrations so we have all parameters we need to operate during a migration
We need all those rbac fields definied in the migration in order for the
current apps to have access to them during a migration.
2016-04-12 11:40:17 -04:00
Akita Noek e3a45235a6 Do an initial save on all resources during amigration to force the creation of RBAC role objects. 2016-04-12 11:40:17 -04:00
Akita Noek 7d2e660749 Make use of 'current' apps so RBAC ImplicitRoleField can work during migrations
While a migration is taking place, we can't juse use normal model
references like Role and RolePermission, nor can we use generic foreign
keys without manually referring to the content type and object id
fields.
2016-04-12 11:40:17 -04:00
Akita Noek 682552d9b0 Added field deconstruct method so ImplicitRoleField works in migrations
Apparently we need this, who'da known.
https://docs.djangoproject.com/en/1.9/howto/custom-model-fields/
2016-04-12 11:40:17 -04:00
Akita Noek 274744b4c1 Replaced Role.singleton usage in migrations as it doesn't exist here apparently 2016-04-12 11:40:17 -04:00
Akita Noek ec439126e0 Added created/modified and another content_object fix in our migrations
#1380 #1425
2016-04-12 11:40:17 -04:00
Akita Noek b1c568e4d9 Fix invalid usage of content_object during migrations
#1380
 #1425
2016-04-12 11:40:17 -04:00
Akita Noek 18dea2203f Removed unnecessary rebuild_role_ancestor_list call in a test 2016-04-12 09:55:20 -04:00
Akita Noek ecedf491a4 Removed erroneous sso login error log
The log message here does not indicate a login failure at all, in fact
it doesn't appear like we get a login failed message, they just don't
get authed.
2016-04-11 23:17:10 -04:00
Akita Noek 24a841a0bf Added sso login logging
Part of #1087

This is untested as we need to have a public facing machine to do SSO
stuff against.
2016-04-11 17:03:04 -04:00
Akita Noek f3cae7e1f0 Log basic auth requests to the debug log
Part of #1087
2016-04-11 17:03:04 -04:00
Akita Noek 6182dad0d4 Added activity stream events for User
Completes development for #1087
2016-04-11 17:03:04 -04:00
Akita Noek 09f1473ef9 Added direct access via teams to the access_list endpoint 2016-04-11 13:46:27 -04:00
Akita Noek 4531f276c2 Updated access_list to include team information for indirect access coming from teams
Finally addresses #1212
2016-04-11 13:46:27 -04:00
Akita Noek 58ee10aa02 Added organization to Credential summary and related fields
#1400
2016-04-05 20:59:05 -04:00
Akita Noek 9455225b3d Merge branch 'devel' of github.com:ansible/ansible-tower into credential-api 2016-04-04 13:12:29 -04:00
Akita Noek da8cd505cf Updated and ported select inventory credential tests to new test system
Also added all the test cases I wrote for the credential api but forgot
to add before the last checking..
2016-04-04 11:05:34 -04:00
Akita Noek 7bccc6203d Merge branch 'devel' into credential-api 2016-04-04 10:30:39 -04:00
Akita Noek 23aca083eb Added and updated several credential creation and listing API endpoints
Should addres #1379
2016-04-01 16:57:08 -04:00
Akita Noek 28acc9516d Hopefully fix ContentType problem hit during 2.4 -> 3.0 upgrade migration
#1380
2016-04-01 15:20:18 -04:00
Akita Noek b9a6f00da2 Reverted attempted fix of ActivityStreamAccess
Related to #1364
2016-03-31 14:28:19 -04:00
Akita Noek 219c09728d Merge branch 'devel' of github.com:ansible/ansible-tower into rbac 2016-03-31 11:32:02 -04:00
Akita Noek 2de83e63c3 Fixed up unified jobs/job templates api endpoints 2016-03-31 11:24:37 -04:00
Akita Noek 0101d53876 super(type(obj),self) -> super(Class, self) fixes 2016-03-31 10:54:01 -04:00
Akita Noek ab03441133 Let exceptions better bubble up through reverse_gfk 2016-03-31 10:54:01 -04:00
Akita Noek 0479c17256 Made reverse_gfk implementation suck a whole lot less
#1342
2016-03-31 10:54:01 -04:00
Akita Noek c61c8b2b45 Revert accidental active_flag removal changes in south_migrations
Fixes #1349
2016-03-31 09:48:14 -04:00
Akita Noek 728c41f03a Split active flag removal migration into two migrations
Re #1344

https://docs.djangoproject.com/en/1.8/ref/migration-operations/#runpython
2016-03-31 09:39:50 -04:00
Akita Noek 534faf011c count->exists 2016-03-31 09:39:50 -04:00
Akita Noek 156aeb931f count -> exists 2016-03-31 09:39:50 -04:00
Akita Noek 6b5c4338cc Removed superfluous method definition 2016-03-31 09:39:50 -04:00
Akita Noek af0b5b42c0 Merged label migrations; Active flag removal on new label system 2016-03-28 10:37:06 -04:00
Akita Noek 3b233f828e Merge branch 'devel' of github.com:ansible/ansible-tower into rbac 2016-03-28 09:23:53 -04:00
Akita Noek 97f16c7779 Added some select_related fields to a few endpoints so performance sucks less 2016-03-26 10:10:52 -04:00
Akita Noek 7310f9aa44 Be lazier with original parent role computations to avoid unnecessary queries 2016-03-26 09:56:57 -04:00
Akita Noek 712ec98f54 Fixed Credential creation in generate_dummy_data command 2016-03-26 09:08:17 -04:00
Akita Noek 453772f62c Fixed up credential viewability expectations in jobs_monlithic tests
Super users can now see all credentials always.. Adjusted test to test
for this, as well as original test intent which was to test to ensure
after removing a team which has access to a credential, members of that
team no longer have access to the credential.
2016-03-24 21:16:15 -04:00
Akita Noek c89a549cbd Removed deprecated user/team from select_related CredentialAccess queryset 2016-03-24 20:31:01 -04:00
Akita Noek c900c9126c missing .add 2016-03-24 18:34:24 -04:00
Akita Noek c60dd9207b Merge branch 'devel' of github.com:ansible/ansible-tower into rbac 2016-03-24 16:12:02 -04:00
Akita Noek 66dc4938a6 Merge branch 'rbac' of github.com:ansible/ansible-tower into rbac 2016-03-24 16:08:32 -04:00
Akita Noek b78221a306 Merge branch 'rbac' of github.com:ansible/ansible-tower into rbac 2016-03-24 16:07:55 -04:00
Akita Noek f9a1e37371 projects.py test fixes 2016-03-24 16:04:22 -04:00
Akita Noek 1dea6610a7 Fixed up tasks.py for credential changes 2016-03-24 15:35:37 -04:00
Akita Noek 434320f5a2 Credential user fix for schedules.py 2016-03-24 15:26:14 -04:00
Akita Noek e323f5a48b Merge branch 'merge-devel' into rbac 2016-03-24 15:23:23 -04:00
Akita Noek 625d94c81f typo 2016-03-24 15:23:10 -04:00
Akita Noek b932174ee2 Fixed up migrations after merge 2016-03-24 13:58:05 -04:00
Akita Noek d07da55eac fix merge fail 2016-03-24 13:54:03 -04:00
Akita Noek 5baa784ce2 Merge branch 'devel' of github.com:ansible/ansible-tower into merge-devel 2016-03-24 13:51:00 -04:00
Akita Noek 683f9cacbb Merge branch 'rbac' of github.com:ansible/ansible-tower into rbac 2016-03-24 13:34:31 -04:00
Akita Noek 9baaa83302 Add explicit transaction=True to some tests for jenkins test environment 2016-03-24 13:33:51 -04:00
Akita Noek f0740794c5 Better implementation of RoleUsersList queryset 2016-03-24 13:30:47 -04:00
Akita Noek bbef9b896f Removed RoleAccess queryset capabilities; add explicit can_read implemenation
We can probably make this into a query set if we're ever interested, but
so far we just use can_read so better to have an explicit implemenation
2016-03-24 13:27:57 -04:00
Akita Noek 2a446d206e Fix for RoleAccess queryset 2016-03-24 13:05:16 -04:00
Akita Noek 922da6ed7a whitespace 2016-03-24 11:06:03 -04:00
Akita Noek 6653a1e747 Validate that user provides a valid organization when posting a project 2016-03-24 11:03:42 -04:00
Akita Noek eccb50a253 Fixed projects creation api endpoints to take organization 2016-03-24 10:22:25 -04:00
Akita Noek 342747866e flake8 2016-03-24 08:59:12 -04:00
Akita Noek 50a2fac465 Fixed some deprecated Team.projects fallout 2016-03-23 22:53:53 -04:00
Akita Noek d838753e60 Fixed up tests from deprecation of Team.projects 2016-03-23 16:25:23 -04:00
Akita Noek 90424eb4b0 Removed pirate debugging statement 2016-03-23 16:24:50 -04:00
Akita Noek 201e4a9ca3 Mark some currently non-functional tests as skipped until they're implemented
re #1254
2016-03-23 15:34:20 -04:00
Akita Noek b263f25911 Merge branch 'rbac' of github.com:ansible/ansible-tower into rbac 2016-03-23 15:30:37 -04:00
Akita Noek de114336ef Merge branch 'rbac' of github.com:anoek/ansible-tower into rbac 2016-03-23 15:30:33 -04:00
Akita Noek 4aa1602255 Deprecated Team.projects and Project.teams relations, switching to using RBAC 2016-03-23 15:30:03 -04:00
Akita Noek 9dbe9fb7ad Moved a couple of test cases from old/projects.py tests to new test_projects.py tests 2016-03-23 14:47:01 -04:00
Akita Noek 9574c3b506 whitespace 2016-03-23 13:36:28 -04:00
Akita Noek 8afa10466f Fix ad_hoc.py tests again
Credential fix
2016-03-23 12:09:04 -04:00
Akita Noek 7fa47c1b38 Merge branch 'rbac' of github.com:anoek/ansible-tower into rbac 2016-03-23 11:34:09 -04:00
Akita Noek 573e8e1151 Marking some job_monolithic tests to skip until we want to fully port them
Tracking the port in #1296
2016-03-23 11:30:33 -04:00
Akita Noek 7eac303ec7 Merge branch 'rbac' of github.com:ansible/ansible-tower into rbac 2016-03-23 09:32:31 -04:00
Akita Noek 68bb342fe9 flake8 2016-03-22 22:25:50 -04:00
Akita Noek fc25cb7e95 More .all() fixes re active flag removal 2016-03-22 22:23:32 -04:00
Akita Noek 6323e023dc .all() fixes re active flag removal 2016-03-22 17:35:36 -04:00