424 Commits

Author SHA1 Message Date
Wayne Witzel III
03c3ac074c Merge pull request #3022 from wwitzel3/issue-2979
Fix sysadmin and sysauditor viewing orphan inventory script.
2016-07-15 15:26:33 -04:00
Akita Noek
e18d142533 Don't let normal users create orgless projects
#3006
2016-07-14 14:29:34 -04:00
Wayne Witzel III
ec2bf4476d ensure system admin/auditor can see orphan inventory scripts 2016-07-14 11:16:16 -04:00
Matthew Jones
e9afee6149 Revert required org on notification templates
This reverts the validation of a required Organization on the
Notification Template.   After discussion with jlaska and jladd, I think
this can behave fine in this situation.   It's more like a Credential
then where without an Organization the NT only becomes available to
Super Users and the creator of the NT.
2016-07-13 11:10:18 -04:00
Matthew Jones
e9a0f41152 Fix an ommitted fields 500 error
If organization or notification_template is omitted entirely from the
POST for a new item then a 500 error would be raised
2016-07-13 10:45:49 -04:00
Wayne Witzel III
f9707c0ca1 Merge pull request #2922 from wwitzel3/issue-2508
ensure CustomInventoryScripts render correctly in the ActivityStream
2016-07-12 08:28:43 -04:00
Wayne Witzel III
f7e9d07dad ensure CustomInventoryScripts render correctly in the ActivityStream 2016-07-11 15:25:35 -04:00
AlanCoding
3e433dc9f3 Remove old method of appending errors because it makes attrs None, causing server errors 2016-07-11 11:27:08 -04:00
Matthew Jones
3e0ed4c1a1 Fix up organization default exposed by unit test 2016-07-06 16:36:22 -04:00
Matthew Jones
f75eba471e Fix flake8 'not in' 2016-07-06 16:09:38 -04:00
Matthew Jones
2528952090 Require organization when creating new notification templates 2016-07-05 15:31:54 -04:00
Alan Rominger
513e6c993f Merge pull request #2647 from AlanCoding/jt_can_add_betterment
A route around get_object_or_400 in JT can_add calcs
2016-06-28 14:31:44 -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
5ed36624a3 Merge pull request #2664 from anoek/todo-cleanup
API todo/fixme addressing and cleanup
2016-06-28 11:01:41 -04:00
AlanCoding
7b0f20e90d job template serializer can_add calc to avoid lookups of known related objects 2016-06-28 10:18:30 -04:00
Matthew Jones
4eb6adb5e7 Add notification_template to summary fields 2016-06-27 15:35:34 -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
Wayne Witzel III
f0418d8841 Merge pull request #2634 from wwitzel3/issue-2560
Disallow non-admin of a user to add a user to Roles
2016-06-27 11:28:38 -04:00
Akita Noek
db02b446e5 Merge pull request #2646 from anoek/2628
Better handle missing notification_type in patches to notification template
2016-06-27 10:47:04 -04:00
Alan Rominger
9923728797 Merge pull request #2635 from AlanCoding/AS_test_pagination
Activity Stream update prefetched fields, avoid a .distinct().count()
2016-06-27 10:29:10 -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
Wayne Witzel III
87ffded774 renaming Credential.owner_role -> Credential.admin_role 2016-06-24 16:55:07 -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
AlanCoding
02dac5299c Activity Stream prefetch update to new fields, avoid distinct.count repeated queries 2016-06-24 14:19:41 -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
Matthew Jones
a9162278f8 Perform length validation on notification lists
Wherever we use a list for notification template configuration we'll now
validate that it contains at least one item at submission time.
2016-06-23 11:31:59 -04:00
Wayne Witzel III
62293341bf Merge pull request #2592 from wwitzel3/issue-2349
filter out duplicate entires for the ActivityStream m2m relations
2016-06-23 11:01:42 -04:00
AlanCoding
d8f11459c9 flake8 fix membership in seralizer 2016-06-23 09:02:44 -04:00
Wayne Witzel III
5277d30d14 filter out duplicate entires for the ActivityStream m2m relations 2016-06-22 17:25:27 -04:00
Matthew Jones
87f1f6f8e6 Update inventory script visibility access level
admin roles on inv scripts can now see the actual script contents.  Read
role doesn't convey that capability.

This should be pretty similar to before from a read_role
perspective... it now allows more folks to see the script contents
2016-06-22 13:48:38 -04:00
Chris Church
59361f5151 Fixes suggested by @AlanCoding. 2016-06-17 09:56:27 -04:00
Chris Church
cf7102bc49 Move validation of credential creation to the serializer. Use SubListCreateAPIView for creating a credential under another object, and remove fields from serializer and API docs that aren't valid when creating a credential under another object. 2016-06-17 09:56:27 -04:00
AlanCoding
5af6d14f27 protect launch endpoint against certain falsy values 2016-06-16 09:41:07 -04:00
Wayne Witzel III
a47f47b790 remove URL and related mapping for User.object_roles 2016-06-14 11:42:08 -04:00
Wayne Witzel III
2c05df064b adjusting API for new Credential.organization 2016-06-10 13:23:02 -04:00
Wayne Witzel III
73acf006cf Merge pull request #2282 from wwitzel3/cred-owners
add credential owner endpoints
2016-06-09 12:01:09 -07:00
Wayne Witzel III
ccc510110d add credential owner endpoints 2016-06-09 14:41:35 -04:00
Alan Rominger
d55bff4c10 Merge pull request #2197 from AlanCoding/2141_survey_passwords
Hide passwords in job_args and activity stream
2016-06-09 14:28:36 -04:00
Michael Abashian
277c3a62f0 Merge branch 'owners-credential-list' of https://github.com/mabashian/ansible-tower into mabashian-owners-credential-list
# Conflicts:
#	awx/ui/client/src/app.js
2016-06-08 18:34:30 -04:00
AlanCoding
39b410ae3e hide passwords in job_args and activity stream 2016-06-08 10:28:53 -04:00
Matthew Jones
8adcc4092c Use defaults when validating jt properties.
Don't assume attrs will be populated.  Check the instance also
2016-06-07 14:14:24 -04:00
Chris Church
2cb69ffce0 Fixed assertion error for inventory tree serializer. 2016-06-06 16:48:47 -04:00
Akita Noek
ae06286a01 Added 'type' to credential serializer owner summary fields 2016-06-06 16:22:37 -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