Commit Graph
100 Commits
Author SHA1 Message Date
Akita Noek b21c7e1d15 Fix inventory update permission so update_role is enough to update 2016-06-30 14:58:44 -04:00
Akita Noek 8ad505c9cc Fixed notification template deleting
#2674
2016-06-28 12:27:13 -04:00
Akita Noek 5043ff45c2 Removed active_roles
The UI isn't using this feature at the moment so we're going to remove
it for 3.0, and probably bring it back in 3.1, potentially in different
ways depending on UI needs then.
2016-06-28 11:02:28 -04:00
Akita Noek 9f43b6e60c Use SubListAPIView for RoleTeamsList 2016-06-28 10:32:36 -04:00
Akita Noek 831c4c2fef Cleaned up some more stale TODO's and FIXME's (or did / fixed the things) 2016-06-27 15:12:37 -04:00
Akita Noek 4bf50b2d6a Dead code removal 2016-06-27 15:12:37 -04:00
Akita Noek bf6767786e Stale comment cleanup 2016-06-27 15:12:37 -04:00
Akita Noek b57739a800 Converted except T,e expressions to except T as e 2016-06-27 15:12:37 -04:00
Akita Noek 7839db0c23 Dead code removal 2016-06-27 15:12:37 -04:00
Akita Noek bf2307946b Locked down roles teams list 2016-06-27 15:12:37 -04:00
Akita Noek d3476ed52a Filter out roles users shouldn't be able to see from parents/children lists 2016-06-27 15:12:37 -04:00
Akita Noek 2b323fc24e Better handle notification template patches for notification_type
This makes it so patches don't require the notification_type to be present
2016-06-27 09:40:39 -04:00
Akita Noek 9494db583d Better handle missing notification_type in patches to notification template
Addresses #2628
2016-06-24 16:50:27 -04:00
Akita Noek 198daf762e Don't update computed fields while mass group deleting until the end
Significantly reduces the time it takes to delete bulk groups, re #2515
2016-06-24 15:28:49 -04:00
Akita Noek ca2b4766a5 Removed some missed things from our Group role removal work
* Removed `groups/n/object_roles`
* Removed `groups/n/access_list`
* `active_roles` from the Group `summary_fields`

 #2631
2016-06-24 14:17:20 -04:00
Akita Noek 291c8126d7 Fixed inventory edit editablity from update_role users
Now you'll need the expected admin_role access to do things like edit
inventory, groups, and hosts.

 Resolves #2561
2016-06-24 11:03:54 -04:00
Akita Noek 20ba96ae84 Description update
With our role removal from inventory groups this description needed some
updating
2016-06-24 09:49:14 -04:00
Akita Noek f6ebf80eba Fixed Group queryset 2016-06-23 11:57:03 -04:00
Akita Noek 392a7dab0d flake8 2016-06-23 11:50:14 -04:00
Akita Noek 7aa31bb51b Updated old test case to allow org admins to create inventory scripts
This was added in https://github.com/ansible/ansible-tower/commit/e9fe45389d7287d1b817d10389367214ab440690
2016-06-23 11:15:56 -04:00
Akita Noek ee8215dc52 Removed InventoryGroup roles 2016-06-23 11:01:22 -04:00
Akita Noek 0bde637308 Hide the "Read" role key from the permissions modal 2016-06-22 09:50:56 -04:00
Akita Noek d329d1807b -debug log 2016-06-21 13:53:36 -04:00
Akita Noek d43cb9fc9f Hide the "Read" role as being something users can select 2016-06-21 13:40:18 -04:00
Akita Noek f580b9f7d8 Hide the team role column and team tab from the add permissions modal on the Teams page 2016-06-21 11:39:01 -04:00
Akita Noek 23ffafd6b9 Fix funky layout on failed project job template warning
Solves #2510

Root cause is the addition of `display: flex` added to `.alert-info` in
https://github.com/ansible/ansible-tower/commit/cefb3713550f3266f02542bc49f8d5e5debbcda4#diff-9ef281f21346102e21d32991c5c756a3R599

however this is apparently needed elsewhere so the easy workaround is to
just wrap any content we don't want flexified in a div.
2016-06-21 10:39:13 -04:00
Akita Noek 665738d355 Hide benign credential 403s from inventory updates
#2415
2016-06-20 16:18:30 -04:00
Akita Noek 175c010296 Attach labels instead of erroring on creation if label already exists
If a label already exists, don't error out when trying to post to the
job_templates/n/labels endpoint, instad just lookup the ID and attach
it. This is primarily to benefit the UI, but in general seems like a
good behavior for this endpoint anyways.

 Fixes #2135
2016-06-10 11:56:19 -04:00
Akita Noek 3becfeaaa8 Fixed permissions dialog not opening on job template page
#2263
2016-06-09 16:01:10 -04:00
Akita Noek dd9351b226 jshint 2016-06-09 12:25:39 -04:00
Akita Noek a2137a54a9 Made HTTP Header field full width
To match our style guidelines
2016-06-09 12:18:05 -04:00
Akita Noek a3b297e582 Display error when trying to delete a job you don't have access to
#2076
2016-06-09 10:30:55 -04:00
Akita Noek 2a7c05eeda Fix stdout height issue on firefox
#2028
2016-06-09 09:56:23 -04:00
Akita Noek a65dfde8dc Nuked obsolete multi-org project help tooltip on projects page
#2237
2016-06-08 15:03:46 -04:00
Akita Noek c1f40f9cbf Better "go to parent state" code 2016-06-08 14:33:18 -04:00
Akita Noek f1d915084a jshint 2016-06-08 13:31:50 -04:00
Akita Noek db9a4b8096 Added CodeMirror for notification http headers field
#1752
2016-06-08 13:18:49 -04:00
Akita Noek 5cb403dffd Made survey text fields min length default to 0 instead of 1 2016-06-07 13:54:21 -04:00
Akita Noek 68cfc71899 Fixed show/hide button being slightly too short on default password input field 2016-06-07 13:30:20 -04:00
Akita Noek abcd2219fc Fixed 'show' button working the first click for the default password survey field 2016-06-07 13:21:21 -04:00
Akita Noek aa24608660 Fixed "always invalid" red indicator around survey default password field 2016-06-07 13:19:00 -04:00
Akita Noek 7f6f3febeb jshint 2016-06-07 11:25:33 -04:00
Akita Noek c601ca7738 jshint 2016-06-07 11:22:52 -04:00
Akita Noek f24818148c Navigate to list view if you delete an object you are editing
This patch covers all the cases I could find of places where you could
delete items that you are currently editing. When this happens, we
should now exit the edit mode and return to the list view for whatever
we were viewing.

 Related to #1742
2016-06-07 10:49:34 -04:00
Akita Noek ae06286a01 Added 'type' to credential serializer owner summary fields 2016-06-06 16:22:37 -04:00
Akita Noek aa6e136859 Fixed stdout viewing on management job pages
#1192
2016-06-06 15:56:42 -04:00
Akita Noek 0067e7006f Fix app crash from our pagination when editing invalid things
Addresses the most important part of #1742 , next patch will be to make
it so we just navigate away from the detail page if we delete the item
we're on.
2016-06-06 15:47:25 -04:00
Akita Noek 7e0122615e Added default values to the required job template survey questions
This is really to fix #1445, the problem being that "" does not pass
float validity, and the show/hide was triggering a check which included
the hidden-but-still-there float fields. So this is an easy work around,
and I think it's better UX as well since these values are required to be
filled in in many cases.

Fix survey maker add button after toggling password visibility
2016-06-06 14:53:25 -04:00
Akita Noek 218f93cfdf Fixed missing double quotes 2016-06-06 13:36:28 -04:00
Akita Noek aba2bcb1f3 Fixed stdout fullscreen functionality
Resolved #2167
2016-06-06 11:45:27 -04:00
Akita Noek e2bda8e2ff Styled extra-vars on management jobs 2016-06-06 11:03:18 -04:00
Akita Noek 76fc0f7c95 Fix monkey-punching XSS
Because damn, punching monkeys

  #2162
2016-06-03 16:29:08 -04:00
Akita Noek ab126b1040 Fixed XSS for project and jt scheduling
#2148
2016-06-03 14:50:35 -04:00
Akita Noek 6609732edd Updated UI to account for object_roles changes 2016-06-03 12:26:23 -04:00
Akita Noek cedecb97e4 Refactored thing/n/roles -> thing/n/object_roles 2016-06-03 12:17:52 -04:00
Akita Noek 1bcb80b621 Made stdout window size nicely to fill the remaining height in the browser
Resolves PR feedback and takes care of #1575 along the way
2016-06-03 11:33:45 -04:00
Akita Noek 93ccbdc872 Code organization 2016-06-02 16:57:11 -04:00
Akita Noek a9426aaeb9 stdout sytle updates
* Fixed column width to 50% for both job stdout view and inventory update
script output view
* Fixed scrolling behavior so we don't have two elements doing scrolling
(inner was doing width, outter was doing height)
* Reduced max height for stdout jt output view to 900px down from
1600px
* Flexified inner output window on inventory script output view so the
gray output area always fills the height of the panel

 #2127 @2028
2016-06-02 16:42:06 -04:00
Akita Noek d565faff98 typo fix 2016-06-02 14:33:24 -04:00
Akita Noek e0a00a8705 Fixed verbosity select2 syncing
#2107
2016-06-02 14:01:28 -04:00
Akita Noek cfe450b7be Fixed missed refactor of function name 2016-06-02 14:01:02 -04:00
Akita Noek c15db1eef6 Fixed up multi-org project migrations 2016-06-02 13:34:10 -04:00
Akita Noek 3247fe42c0 Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into jshint 2016-06-01 22:56:31 -04:00
Akita Noek e93969fb10 jshint fix 2016-06-01 16:09:21 -04:00
Akita Noek 3b1639da4f Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into JobDetailHostEvents 2016-06-01 15:06:11 -04:00
Akita Noek 37a7e0a862 Bump to trigger jenkins 2016-06-01 14:41:49 -04:00
Akita Noek 7f9174f4ea Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into JobDetailHostEvents 2016-06-01 14:09:51 -04:00
Akita Noek 4f20ffb328 Typo fix 2016-06-01 12:12:45 -04:00
Akita Noek cc507cee1f Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into JobDetailsAudit 2016-06-01 09:13:29 -04:00
Akita Noek 3c8c72adf9 JSHint fix: unused variable 2016-06-01 09:03:06 -04:00
Akita Noek 8c5086a5e7 Merge branch 'release_3.0.0' of github.com:ansible/ansible-tower into 858 2016-06-01 09:00:09 -04:00
Akita Noek d971461ae6 Commented out code cleanup 2016-05-31 17:15:14 -04:00
Akita Noek 44ff9a02bc -console.log 2016-05-31 17:08:08 -04:00
Akita Noek d8dac662a1 Fixed/enhanced scan job type selection process
* Appropriately set project and playbook to default when job type is set
  to 'scan' - #1273
* Add 'RESET' link on the Project label line to reset to Default
  project/playbook #858
* Fixed dropdown option clearing problem #1489
* Remember what project/playbook was set when switching from run/check
  to scan, so if you change back, those options will be auto-selected
  again
2016-05-31 16:03:01 -04:00
Akita Noek 22300347f0 JSHint fixes 2016-05-27 14:39:08 -04:00
Akita Noek e3fcdf9ba8 Unobfuscated some decorators 2016-05-27 14:18:05 -04:00
Akita Noek f6da30dde3 Avoid unnecessary license checks 2016-05-27 09:32:29 -04:00
Akita Noek eedd48c82b == to === 2016-05-26 20:58:08 -04:00
Akita Noek 6b3638c0bb Show stdout download button for canceled jobs
Addresses #733
2016-05-26 16:35:26 -04:00
Akita Noek c5dfde236b Test "fix"
Having this triggers a license feature test, which the jenkins test
system apparently doesn't have.. I don't think it's particularly
important to test this particular field, so meh.
2016-05-26 15:18:23 -04:00
Akita Noek e531bc67e4 Better control what JT admins are allowed to do
This addresses #1981 which says that JT admins can make modifications to
a job template freely if they're just changing non functional things
like name, description, forks, verbosity, etc, while requiring them to
have access to all functional components if they're going to make any
changes to the functionality - in specific, any changes to the
inventory, project, playbook, or credentials requires that the user have
the appropriate use access on all of those things in order to make the
change.
2016-05-26 14:39:16 -04:00
Akita Noek fed8d49d86 Added optional "expect" arg for REST fixtures" 2016-05-26 13:58:26 -04:00
Akita Noek aca858f5b2 Ported some old adhoc tests over to the new system 2016-05-26 13:58:16 -04:00
Akita Noek 5ea372ae43 Updated Job.limit expectation in old tests
See 821c43ba88d18feaded696e9994a9c5277a3195b
2016-05-26 13:58:08 -04:00
Akita Noek aa49e071c6 Disabling RAX test until we get our cert issue figured out
Related to #1706
2016-05-26 13:57:55 -04:00
Akita Noek 1abba522b0 Resurrect global .distinct() call (mostly)
This mostly reverts 3c67971e78a12bd94536aa5464f0bc1ea46ba1ee with
the minor difference that we only apply this when we're filtering,
which is apparently necessary without some notable overhaul since
the filtering we're doing will get stuck in as filters, which will
generate inner joins, which can result in duplicates if the thing
we're joining with is a one to many or many to many, which most
things are.

With this patch we still need to be generating naturally distinct
querysets with any `get_queryset` methods, which will still be much
more effecient when filtering is not involved.

This fixes #2032 and probably a bunch of other undiscovered issues.
2016-05-24 22:19:51 -04:00
Akita Noek 19dcc06c9d Read permissions goes to read_role, not use_role
Dork.
2016-05-24 21:10:43 -04:00
Akita Noek 899ff8ed3b flake8 2016-05-24 13:19:55 -04:00
Akita Noek 81f093b1c0 Opt to rebuild all roles in helper method
This code was fine for the 0009 migrations since we introduced all roles
at once, however with changes in 0017 we can't just patch from the
roots, so this works generically without having to get fancy about
identifying which roles we need to actually update.
2016-05-24 12:46:43 -04:00
Akita Noek 8aa4df1b78 Fix job template migrations again
Eliminated some incorrect wtf filtering in permissions, and fixed up the
credential access checks.
2016-05-24 12:45:22 -04:00
Akita Noek 5dbce56beb When migrating, grant read_role instead of use_role appropriately
Only give read access to folks that didn't have explicit permissions to
use a project in a job template before.
2016-05-24 12:42:51 -04:00
Akita Noek 5eb67411a4 Rebuild role hierarchy after making changes in migrations
Signals don't fire in migrations, so gotta do this step manually
2016-05-24 12:38:25 -04:00
Akita Noek a5bc62d7d4 enforce use_role access on both inventory and project when adding a JT 2016-05-24 12:37:44 -04:00
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