Akita Noek
4e9e341819
Disable custom inventory script input when you have no access
...
Also show 'Script contents hidden'
#1503
2016-05-20 14:53:36 -04:00
Akita Noek
fd9c96aa80
Executed the inventory execute_role
...
Replaced with the 'use_role', which is now useful.
Completes #1959
2016-05-20 14:10:29 -04:00
Akita Noek
10cb04ae80
Fix access list to return complete team role list
...
We were just returning the first element before, dur.
Fixes #1932
2016-05-19 16:37:06 -04:00
Akita Noek
741c6a0cfd
Text update for team role removal confirmation message
...
#1919
2016-05-19 14:46:35 -04:00
Akita Noek
1d8f69c156
Split permissions list into two columns
...
One for user perms and one for team permissions
#1986
2016-05-19 14:32:13 -04:00
Akita Noek
49b88dd646
Hide the user type selection for non super users
...
Completes UI portion of #1974
2016-05-19 13:34:51 -04:00
Akita Noek
23e7e12a04
Support creating system auditors through all 4 of our user creation endpoints
2016-05-19 13:07:58 -04:00
Akita Noek
e6322baf20
Show selected playbook in JT's even if you can't read the project
...
#1955
2016-05-19 12:08:46 -04:00
Akita Noek
01a2590271
Don't allow text selection on checkbox labels nor buttons
...
Prevents annoying random text selection when you're clicking through
things.
2016-05-19 11:02:43 -04:00
Akita Noek
aa9a4925b0
Fix annoying warning message related to license info not loading appropriately
...
Log it into the console though.
This shouldn't be necessary after #1763 lands, but isn't a bad thing to
be doing in general.
2016-05-19 10:03:42 -04:00
Akita Noek
9fba513c4f
Protect against bad posts, fixes some test cases
2016-05-18 17:01:38 -04:00
Akita Noek
49a2f6b535
Default is_system_auditor to False in serializer for API compatibility
2016-05-18 16:50:52 -04:00
Akita Noek
9e562deb0c
Copy paste error
2016-05-18 16:50:43 -04:00
Akita Noek
58f142e2e6
Update user add/edit UI to support System Auditor setting
...
Also moved the LDAP indicator to be inline with the mockups (bubble next
to the uesrname in the upper left)
#1937
#1888
2016-05-18 16:08:36 -04:00
Akita Noek
d79d8cbfba
Don't let Org Admins promote themselves to System Admins
...
Nor System Auditor
2016-05-18 16:03:36 -04:00
Akita Noek
390ac656fa
Bolted is_system_auditor faux-field onto User
2016-05-18 16:02:10 -04:00
Akita Noek
70f561c895
Make tab skip over 'SHOW' buttons next to sensitive / password prompts
2016-05-18 13:53:21 -04:00
Akita Noek
e9ea791a85
Brand that cow!
2016-05-17 11:47:49 -04:00
Akita Noek
9026d02be2
Fixed our beloved cow
2016-05-17 11:06:58 -04:00
Akita Noek
802a112106
Fixed project update permissions
...
Now folks in the update role can update a project as intended, yay!
#1929
2016-05-17 09:01:17 -04:00
Akita Noek
98412b52f2
Handle non-existent license data in config view
2016-05-16 16:34:01 -04:00
Akita Noek
2c652a7375
Typo
2016-05-16 16:14:53 -04:00
Akita Noek
a828e8b005
Implemented team role removal
...
Also threw in the little fa-users icon when it's a permission coming from a team
#1919
2016-05-16 15:21:04 -04:00
Akita Noek
06eb13a104
Fixed duplicate users in access_list
...
Uhg.
2016-05-16 10:52:41 -04:00
Akita Noek
ac5bc2aaba
Fixed duplicate entries in active_roles (again)
...
#1692
2016-05-16 10:49:34 -04:00
Akita Noek
a2cc2927e6
Turn off activity stream flag in the UI if we have it explicitly disabled in our settings file
2016-05-16 10:38:22 -04:00
Akita Noek
01e01fdb82
Hide AS/Dashboard button for basic licenses
...
#1791
2016-05-16 10:28:40 -04:00
Akita Noek
60f76de5c3
RBAC doc updates
2016-05-13 12:01:54 -04:00
Akita Noek
6958e81d00
Filled in RBAC descriptions
...
#1655
2016-05-13 10:11:38 -04:00
Akita Noek
9d46a39e42
Added comment context to caught exception
2016-05-12 16:31:32 -04:00
Akita Noek
acc49bbbef
Fixed up JT migration tests
2016-05-12 13:46:13 -04:00
Akita Noek
27457239bc
Fixed up job template migrations
...
Massive speed improvement as well as made it not wrong (or at least less wrong).
2016-05-12 13:43:36 -04:00
Akita Noek
4378430c4f
Minor migration speed improvement for old access queries
2016-05-12 13:43:36 -04:00
Akita Noek
6c0c789612
Make job queryset only require JT read access to see
...
As opposed to credential access, since users can see and potentially run
JT's without credential access now.
2016-05-12 13:43:36 -04:00
Akita Noek
fb97438573
Enforce jt admin_role requirement for changing/deleting JobTemplates
2016-05-12 13:43:36 -04:00
Akita Noek
be8a1f4859
Another orgfunc migration fix
2016-05-12 13:43:36 -04:00
Akita Noek
83a30f57f5
Fixed JobTemplate migration when inventory is NULL
...
JobTemplate.inventory can be NULL if the inventory was deleted.
2016-05-03 15:56:02 -04:00
Akita Noek
1f49b475bd
Filter out a users own Admin Role from their roles list
...
As per a UI request, we don't want to show the implicitly defined
'admin_role' roles that get created for every user so they can manage
themselves. These roles exist for every user, and the only members of
those roles are the users themselves, so it's a pretty boring role. We
also don't want to allow for anyone to be removed from their own admin
role, so hiding this is probably a good thing all around to avoid
confusion and clutter.
Fixes #1689
2016-05-03 13:52:34 -04:00
Akita Noek
410a9dd45f
Special case handlign for team access list to prevent "read" role showing up as a direct team role
...
Fixes #1713
2016-05-03 13:42:14 -04:00
Akita Noek
18796ec3ff
Inventory/Group/Host updating is allowed by those with update_role not just admin_role
2016-05-02 16:38:57 -04:00
Akita Noek
e50f20eb69
Check can_update for ProjectAccess.can_start for superusers too
...
can_update is a special model getter that checks to see if the project
is in a valid state it looks like - so it's important to check this for
superusers too. The can_change check does the implicit is_superuser
check for us, so we don't need another expclit check here, just
can_start protection.
2016-05-02 15:56:05 -04:00
Akita Noek
f6f555b185
Prevent organization changes for teams
...
In old_access.py we restricted even super users from doing this. I'm not
sure that it'd actually break anything to allow this, but I'm making the
new access.py behave like old_access.py for good measure until we have a
valid usecase for this.
2016-05-02 15:49:59 -04:00
Akita Noek
826874d61c
CredentialAccess fix to ensure appropriate access to what we're adding a credential to
2016-05-02 15:43:12 -04:00
Akita Noek
c7f2568c10
Fixed up some credential migration issues
2016-05-02 14:44:15 -04:00
Akita Noek
5825737447
Reduce JT read access check to simple read_role check
2016-05-02 11:27:37 -04:00
Akita Noek
83e83a5db3
Actually do job template migrations
...
Seems important
2016-05-02 11:16:15 -04:00
Akita Noek
58e9c4ef87
Fixed JT migration issue
...
Role.__contains__ is not defined here, so we needed to drop in the
implementation instead.
2016-05-02 11:14:31 -04:00
Akita Noek
8a5e22cb4a
Fix old_access user/team reference
2016-05-02 10:14:29 -04:00
Akita Noek
29b55fa04d
Moved access control from credential add view to access.py
...
as it should have always been. This messes up being able to post to
api/v1/users/:n/credentials and api/v1/teams/:n/credentials without
specifyign the user/team id in the post body, but looking at the old
code it looks like this might have always been the case, so whatevs..
This fixes a old v new access.py test "failure", and is better anyways..
2016-04-29 17:27:14 -04:00
Akita Noek
1bf4fdbff1
Fixed up the _old_access.py UserAccess queryset
2016-04-29 16:57:51 -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
Akita Noek
ac1503e55c
Fixed org migrations.. users are 'members' not 'auditors'
2016-04-28 11:50:36 -04:00
Akita Noek
27a7cf0d88
Added an explicit save everything step in the rbac migration
...
This step ensures all of our roles get setup before we start the
migration. It also speeds things up a little as we can wrap everything
with a `with batch_role_ancestor_rebuilding()`. We were pretty much
doing this already, but we had an issue where we didn't catch all job
templates all the time, so this just makes it very explicit and ensures
everything is setup, and does so a little faster.
2016-04-28 10:37:15 -04:00
Akita Noek
951d728472
Fixed and updated activity stream delete operations
...
Switched to using pre_delete instead of post_delete to record activity
stream delete operations so we have access to all of the fields that may
be associated with the field (eg things that may be being deleted with
this object through a cascade delete).
Switched to recording the full dict of the object instead of a diff
(since the diff will always be empty).
2016-04-28 09:49:26 -04:00
Akita Noek
c9501ad556
commented out code cleanup
2016-04-28 09:39:18 -04:00
Akita Noek
af4daec314
More RBAC migration fixes
2016-04-27 16:59:33 -04:00
Akita Noek
b670681f6c
Handle JT "create" permissions during migration
2016-04-27 15:28:17 -04:00
Akita Noek
a6f735b4b9
Fixed call to role rebuilder during migrations
2016-04-27 15:27:52 -04:00
Akita Noek
9921d90316
Fixed duplicate active_roles entries
...
#1692
2016-04-25 20:33:59 -04:00
Akita Noek
601bd0da05
Fixed up 2.4.5 -> 3.0 no_log merge
...
Addresses #1295
2016-04-25 15:52:38 -04:00
Akita Noek
3e4c26de13
Added resource information summary fields to the Role serializer
...
Completes #1676
2016-04-25 15:43:01 -04:00
Akita Noek
3ffefd30a3
flake8
2016-04-25 14:43:03 -04:00
Akita Noek
40147f28f8
Updated test
2016-04-25 14:29:05 -04:00
Akita Noek
30ed9ab740
Reverted cursor pagination for /roles/
...
Turns out it doesn't play well with our custom filters, and performance
is still tolerable with the normal pagination..
2016-04-25 14:29:05 -04:00
Akita Noek
d0e9044dad
Enforce team access permissions on team/:n/roles
2016-04-25 14:29:05 -04:00
Akita Noek
4c15374b05
Optimized (user|team)/:n/roles/
2016-04-25 14:29:05 -04:00
Akita Noek
9df157c971
Added gfk index pair for Role for our access_list queries
2016-04-25 14:29:05 -04:00
Akita Noek
8e4d013342
Optimized /api/v1/hosts/
2016-04-25 14:29:05 -04:00
Akita Noek
754f8546a6
Switched /api/v1/roles/ to a cursor paginator so we don't have to do a count() on that potentially very large result set
2016-04-25 14:29:05 -04:00
Akita Noek
6250d9f7e7
Optimized RBAC visible_roles query
2016-04-25 14:29:05 -04:00
Akita Noek
c18aa44ced
Return Queryset instead of Manager fix
2016-04-22 13:48:58 -04:00
Akita Noek
44a8da83c2
Removed all encompassing .distinct() call for all views
...
This .distinct() call applied .distinct() to all list query sets. Most
query sets are already unique, and adding .distinct causes the database
to do a lot of extra work. Views that rely on this behavior will be
rooted out during the hardening sprint and .distinct() will be added to
the individual querysets as needed instead of applying this everywhere.
2016-04-22 12:30:03 -04:00
Akita Noek
b1e140d83d
flake8 fixes
2016-04-22 10:17:21 -04:00
Akita Noek
17120ffe4f
Futher optimze role rebuilding to be aware of whether we are adding or removing parentage
2016-04-22 10:17:21 -04:00
Akita Noek
569f61ed30
Fixed swapped transaction/rebuild statements
2016-04-22 10:17:21 -04:00
Akita Noek
0c6dcb2337
Optimized our simultaneous role ancestry rebuilding method
2016-04-22 10:17:21 -04:00
Akita Noek
ee97ef2fc8
Fix 0008 field addition orderings
2016-04-22 10:17:21 -04:00
Akita Noek
280993a15d
Dropped stored role name/description and other superflous fields
...
For name and description, we'll derive these from the role_field and
content type, which is much better for lots of reasons (eg changing text
the future). Also ditched the rest of the fields comming from the
standard common base model, we didn't use them and they cost several
indexes on the table.
2016-04-22 10:16:04 -04:00
Akita Noek
aae548fbdc
Regenerated 0008 migration to get rid of Implicit role names/descriptions
2016-04-22 10:16:04 -04:00
Akita Noek
3a2f5d1362
Update BaseSerializer to handle objects that dont have created/modified fields
2016-04-22 10:16:04 -04:00
Akita Noek
f57b6da6a5
.gitignore updates
2016-04-20 14:57:35 -04:00
Akita Noek
659d43136f
Added missing import
2016-04-20 11:50:20 -04:00
Akita Noek
31920c6700
Removed awx/api/tests dir from Makefile since it no longer exists
2016-04-20 11:48:09 -04:00
Akita Noek
22f18715f7
Removed dup tests, moved old api tests into main/tests/old/api
2016-04-20 11:29:01 -04:00
Akita Noek
568f0e43a5
Skip old slow tests for normal unit test runs, pick them up in nightly runs
2016-04-20 11:27:17 -04:00
Akita Noek
a0d25434df
Skip old splunk test
...
This should be removed by #1613
2016-04-20 10:50:54 -04:00
Akita Noek
0434712dc9
Complete the removal of cycle support in RBAC
...
We removed the actual need for this when we broke the org<->team cycle.
This patch removes the code we had to support that, but since it's
costly and unused, it's now nixxed.
2016-04-19 22:14:38 -04:00
Akita Noek
70148dc2f3
Restored old large inventory test timings
...
Fixes #1584
2016-04-19 22:14:38 -04:00
Akita Noek
f85090110f
Fixed up fact tests to work with both sqlite and postgres
...
Ugly hack for now.. should be cleaned up when we get everything moved
over to postgres
2016-04-19 22:14:38 -04:00
Akita Noek
6864701d8b
Revert "Fixed fact cache test difference between sqlite3 and postgres"
...
This reverts commit 631084b10f4435efe56d3a4fc774dd250f74e2ee.
2016-04-19 22:14:38 -04:00
Akita Noek
127bff5134
Moved role rebuild batching down into sim rebuild code so we can call it directly
2016-04-19 22:14:38 -04:00
Akita Noek
5197c1b65a
Optimized implicit role creation for new instances of resources
2016-04-19 22:14:38 -04:00
Akita Noek
233ed894d6
Optimized ImplicitRoleField post_delete action
2016-04-19 22:14:38 -04:00
Akita Noek
c0e056d6d0
Fixed fact cache test difference between sqlite3 and postgres
...
I guess the sqlite adaptation of the JSONField was resulting in a json
encoded blob, where as the postgres version returned something that got
parsed out normally with the rest of the query result?
2016-04-19 22:14:38 -04:00
Akita Noek
6349cc0f85
Skip test_fact.py migrations if MONGO_DB is not confingured
2016-04-19 22:14:38 -04:00
Akita Noek
7ee2c89ab5
test_notifications.py id fix
...
Ass-ummed an id of 1
2016-04-19 22:14:38 -04:00
Akita Noek
85a1b30af5
Skip activity stream tests if activity stream is disabled
2016-04-19 22:14:38 -04:00
Akita Noek
450e6f2885
Removed git configuration from org count projects
...
Avoids unnecessary cloning of said git repo, runs in 4 seconds now
instead of 50 seconds
2016-04-19 22:14:38 -04:00
Akita Noek
2a0b445488
Remove git project configuration from project test fixtures
...
Having this in here causes us to go out and pull down the repo whenever
we run a test, adds around 9 seconds per test on a good connection.. if
we need real data in here, we should figure out how to get it locally
2016-04-19 22:14:38 -04:00
Akita Noek
f0aebd00eb
Removed transaction=True from pytests
...
This was overkill and cost 3s per instance, all we needed to do is wrap
things that expectedly fail transactions with transaction.atomic()
2016-04-19 22:14:38 -04:00