Commit Graph

1024 Commits

Author SHA1 Message Date
Matthew Jones
5d32d6e17a Add password to survey spec documentation 2016-06-06 13:24:21 -04:00
Matthew Jones
b0de8038d0 Fix validation issues for scan job templates
Also adding some jobtemplate serializer-based validation unit tests
2016-06-06 12:01:56 -04:00
Akita Noek
cedecb97e4 Refactored thing/n/roles -> thing/n/object_roles 2016-06-03 12:17:52 -04:00
Matthew Jones
26b31fedbc Expose any external account as a user property
This adds a field to the user object to denote whether and what kind of
user account it is.

For normal accounts this field will be null.
For social auth accounts it will be "social"
for radius accounts it will be "radius"

This change also prevents a radius user from changing their local
password thus bypassing the password caching feature of django-radius
2016-06-02 16:58:19 -04:00
Matthew Jones
1881af8e77 Fix passively creation of notification templates
Passively creating notification templates on m2m endpoints was failing
serializer validation due to a bug trying to look up the related
object.  In reality that check should only happen when the view is the
NotificationTemplateDetail view.
2016-06-02 15:04:51 -04:00
Matthew Jones
0591647333 Implement a flag that allows simulteanous job launches on job templates 2016-06-02 15:04:51 -04:00
AlanCoding
cfd9d5d4f1 Refactor of JT related field checking 2016-05-31 14:34:51 -04:00
AlanCoding
1ec2c1b3b7 new tests, and stricter can_copy can_edit 2016-05-31 14:34:51 -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
Alan Rominger
95ccdecf13 Merge pull request #2010 from AlanCoding/1999_see_your_own_JT_30
Automatically add JT creator to admin_role
2016-05-26 12:32:27 -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
AlanCoding
f695caf1ac auto associate JT creator with admin_role 2016-05-23 14:56:23 -04:00
AlanCoding
3f63172ac4 inventory exec role changed to use 2016-05-20 15:36:00 -04:00
Akita Noek
2648265711 Merge pull request #1991 from anoek/1932
Fix access list to return complete team role list
2016-05-20 13:34:26 -04:00
Akita Noek
ba19e0e105 Merge pull request #1975 from anoek/auditor-support
Add support for creating system auditors
2016-05-20 13:33:21 -04:00
Matthew Jones
7514ed389a Don't trim whitespace from customer inv scripts 2016-05-20 13:30:10 -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
23e7e12a04 Support creating system auditors through all 4 of our user creation endpoints 2016-05-19 13:07:58 -04:00
Akita Noek
727dc580c7 Merge pull request #1968 from wwitzel3/issue-1938
adds related `roles` for InventoryScript
2016-05-19 09:25:53 -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
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
Alan Rominger
50bb6b8fc3 Merge pull request #1951 from AlanCoding/1949_scan_runtime_bugs
Fix 500 error caused in job launch runtime vars validation
2016-05-18 15:34:58 -04:00
Wayne Witzel III
c99e4ea398 remove copy/paste .all() from Role get_queryset implementations 2016-05-18 15:23:41 -04:00
AlanCoding
5bc0403d9c add spaces around euality operator 2016-05-18 15:18:27 -04:00
Wayne Witzel III
cce7af3d19 adds related roles for InventoryScript 2016-05-18 14:21:30 -04:00
AlanCoding
f6b3da0c46 Make error message grammar more consistent 2016-05-18 13:39:06 -04:00
Wayne Witzel III
4395f3945c Merge pull request #1945 from wwitzel3/issue-1936
move related roles UnifiedJobTemplate -> JobTemplate
2016-05-18 10:22:08 -04:00
Alan Rominger
5fc5f1858a Merge pull request #1801 from AlanCoding/1773_cred_detail_serializer
Purge credential detail view of special fields
2016-05-18 09:54:43 -04:00
AlanCoding
f19088db1b fix job_type change 500 error, patch up runtime tests 2016-05-18 09:24:33 -04:00
Wayne Witzel III
ddc8f73b63 move related roles UnifiedJobTemplate -> JobTemplate 2016-05-17 11:29:26 -04:00
Matthew Jones
430b548395 Exclude the job template limit during callback
This causes some unexpected behavior when commas instead of colons are
used during the job template limit due to a bug in ansible.  It has the
effect of expanding the number of hosts that it will run on instead of
just one which is what we are expecting
2016-05-17 10:35:14 -04:00
Akita Noek
3862d6d1be Merge pull request #1935 from anoek/1929
Fix project update permissions
2016-05-17 10:15:20 -04:00
Alan Rominger
863105435e Merge pull request #1871 from AlanCoding/1868_org_cts_sublist
Add organization resource cts. in sublists
2016-05-17 09:58:44 -04:00
Akita Noek
b2d7918912 Merge pull request #1924 from anoek/devel
Turn off activity stream flag in the UI if we have it explicitly disabled in our settings file
2016-05-17 09:02:59 -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
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
Alan Rominger
4919eff769 Merge pull request #1837 from AlanCoding/1826_job_runtime_validation
Protect against special scan job cases in job runtime validation
2016-05-16 09:51:33 -04:00
Wayne Witzel III
599902da47 update api view/serializers for new role names 2016-05-13 12:00:33 -04:00
Wayne Witzel III
542d3d22b2 Merge pull request #1889 from wwitzel3/issue-1881
remove URL and add roles endpoint for JobTemplate
2016-05-13 09:16:37 -04:00
Wayne Witzel III
0ef456e4d8 added related Roles to Project, Credential, Inventory, and Group 2016-05-12 10:05:46 -04:00
Matthew Jones
c6eedce3d8 Further purging of cleanup_deleted 2016-05-11 15:07:56 -04:00
Wayne Witzel III
6a5f4d6113 remove URL and add roles endpoint for JobTemplate 2016-05-10 16:29:11 -04:00
Matthew Jones
d5afbc20ac Require cloud on inventory source for notification
Inventory Sources must now be a cloud type in order to associate a
notification template with it.
2016-05-10 14:50:34 -04:00
Alan Rominger
ac24fc75b8 Merge pull request #1823 from AlanCoding/532_survey_validation
Block Duplicate Survey Variables
2016-05-10 13:35:57 -04:00