Commit Graph

102 Commits

Author SHA1 Message Date
Matthew Jones
2bdc79f3ba Optimize inventory read check for Job Templates
Our old check used an extremely inefficient boolean logic AND and
generated a bad query.   This does a simpler check by querying the
inventories that the user has access to and using that as a simple
condition when performing the job template permission query
2015-08-19 13:26:10 -04:00
Matthew Jones
df61fd6ab8 Check inventory access for normal users when deciding what job templates
show up in the job template queryset
2015-06-11 16:24:54 -04:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Matthew Jones
7d8edd9617 Check survey license enabled when creating, updating, and starting job
templates with surveys enabled
2015-06-01 17:01:49 -04:00
Matthew Jones
06464333a6 Check license before launching job template and disallow scan job
template launch if license is unsupported
2015-06-01 14:15:42 -04:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
Matthew Jones
5b3b4b48c0 Fix an issue when creating scan job templates where we weren't obeying
the license flag, so folks could still create scan jobs even if they
weren't enabled by the license.  Plus Unit Tests
2015-05-28 15:59:49 -04:00
Chris Church
1b1d43dc59 Prevent launching ad hoc commands when license has expired. 2015-05-21 14:13:37 -04:00
Chris Church
2d1d371582 Return 400 when attempting to relaunch an ad hoc command with deleted inventory. Fixes https://trello.com/c/IbvBelXJ 2015-05-11 20:32:43 -04:00
Chris Church
9e898bf42a Add support for deleting ad hoc commands. Fixes https://trello.com/c/WLnhi28V 2015-05-11 20:14:15 -04:00
Chris Church
7be54d585b Fix RBAC query bug in checking if user can run ad hoc commands. Fixes https://trello.com/c/fl36Hvh3 2015-04-16 15:27:16 -04:00
Chris Church
76132dbab2 Update license check when adding hosts. Fixes https://trello.com/c/Llol9BCJ 2015-04-16 12:28:13 -04:00
Chris Church
e2a6f100e1 Finish ad hoc command unit tests. 2015-04-05 18:32:04 -04:00
Chris Church
88e7f6624c Update relaunch endpoints to use custom serializer, check passwords needed before creating/copying job or ad hoc command. 2015-03-31 17:40:00 -04:00
Chris Church
02eda72bd9 Add name field for ad hoc commands, get relaunch working. 2015-03-31 16:42:35 -04:00
Chris Church
f7b8d510dc Implement support for ad hoc commands. 2015-03-30 13:04:19 -04:00
Matthew Jones
3d46a4ce37 Some testing and bug fixes for scan job templates 2015-03-06 11:00:28 -05:00
Matthew Jones
cca8c3fac1 Updated rbac for scan job and job template types 2015-03-05 12:40:28 -05:00
Matthew Jones
c4e320bf76 rbac tweaks for scan jobs templates 2015-03-03 15:08:18 -05:00
Matthew Jones
bb3732b2c1 Cleaning up some flake8 errors, pyflakes in this case 2015-02-10 17:00:23 -05:00
Matthew Jones
f51e248c8b Fix a Project query rbac performance issue 2015-02-10 12:35:21 -05:00
Matthew Jones
9e97783b13 Fixing up more pep8 issues 2015-02-04 16:32:14 -05:00
Matthew Jones
6e6a709165 Fixing up some pep8 issues 2015-02-03 13:46:58 -05:00
Matthew Jones
20910e0e95 Fix up some serious issues posting new surveys and deleting them by
non-super users.   Also fix up some issues checking can_change for job
templates for operations like PATCH where not all of the data points
will be submitted
2015-01-27 15:12:58 -05:00
Matthew Jones
b5db74a7d9 Generalize the python boolean converter so we can use it in RBAC methods 2015-01-26 11:57:21 -05:00
Matthew Jones
16a9af0803 Fix an issue where non-org-admin users with appropriate job template
permissions were not able to view or edit schedule details
2015-01-21 13:49:24 -05:00
Matthew Jones
4ce0fc4eb4 Purge old super user check decorator in favor of using RBAC. Update
unit tests
2015-01-19 13:54:49 -05:00
Matthew Jones
da658ee524 Fix an issue with relaunching jobs 2014-12-18 16:39:04 -05:00
Matthew Jones
9ce6101cd4 Do not display inventory scripts for which the organization is inactive 2014-12-18 10:04:40 -05:00
Matthew Jones
96433b07d4 Incorrect object reference in Custom Inventory Script read acl for non-super-users 2014-12-11 13:47:33 -05:00
Chris Church
109988da13 Fix typo, modify can_update to prevent inventory update from even starting when source script is missing. 2014-12-03 18:35:33 -05:00
Matthew Jones
e05f9e081c Throw an error when running an inventory update against an inventory
script that has been deleted
2014-12-03 16:09:55 -05:00
Matthew Jones
19c0d04885 Adding organization reference to the custom inventory script 2014-12-03 15:05:44 -05:00
Matthew Jones
fc5eb09e2a Fix up some rbac issues that were blocking survey taker incidentally and
otherwise preventing normal users with the right permissions from
starting jobs
2014-12-01 14:01:03 -05:00
Chris Church
ad856391f6 Use select_related and other misc fixes to improve performance and reduce queries. 2014-11-24 21:12:21 -05:00
Luke Sneeringer
f49fe9ff56 Make it faster. 2014-11-24 14:41:13 -06:00
Matthew Jones
8916863cd3 Tweaks for Job Template based permissions covering delete and read
operations when the license has expired. Fix an issue where users
without the appropriate permissions could still delete job templates
2014-11-10 10:58:08 -05:00
Matthew Jones
902ef1a7ab Read and run permission tweaks for new deployment permission type 2014-11-07 13:18:01 -05:00
Matthew Jones
ede6142cea New permission for users and teams that allow creating job templates,
this makes Deployment permissions more granular.  Includes unit tests
and a migration to promote existing "run" permissions to "create".

Also some slight doc updates to denote that this implies "run" and "check"
2014-10-31 15:04:46 -04:00
Matthew Jones
df4366bdba Finish up the job template copying -> job_template/n/launch switch since
the UI implements this correctly now
2014-10-29 15:17:18 -04:00
Matthew Jones
ce50376c7f Updating job list api endpoints to be able to display system jobs if you
can see them and any have run
2014-10-17 14:56:40 -04:00
Matthew Jones
b3ea148f53 Label the SystemJob Access class with the proper model 2014-10-14 13:54:12 -04:00
Matthew Jones
fa0879f15b Add basic access for system jobs (super user only) 2014-10-14 13:47:44 -04:00
Matthew Jones
d6adb1d398 Add a settings that disallows org admins from seeing users outside of
their organization.   See: https://trello.com/c/M74W11hQ
2014-10-06 15:59:05 -04:00
Matthew Jones
06c75aeecf Implement API side for custom inventory script support with endpoints
and unit tests
2014-09-30 11:50:50 -04:00
Matthew Jones
2da1189a7c Change access to only allow super users to post to the jobs list without
a job template
2014-09-05 14:54:33 -04:00
Matthew Jones
58b71ca9f9 Implement /launch endpoint on job template
Partial implementation of:

https://trello.com/c/7uXHs7ze/14-require-admin-to-be-able-to-run-a-job-without-a-job-template
2014-09-04 13:26:00 -04:00
Matthew Jones
5e0917cd92 Prevent creating a job if the license is expired 2014-08-18 12:47:27 -04:00
Matthew Jones
6d2d0aa1a5 Fix an issue where we would only list manual projects in the unified job
template api list
2014-08-11 13:16:54 -04:00
Matthew Jones
12b3329b27 Test for Jenkins unit test runs in some rbac code also 2014-08-06 12:39:12 -04:00