Commit Graph

114 Commits

Author SHA1 Message Date
Chris Church
1db697e4eb Add multiprocessing RLock around event data output to ensure only one process is writing to stdout at a time. 2016-11-17 09:09:19 -05:00
Aaron Tan
2d1a5425d1 Fix flake8 E302 errors second round. 2016-11-16 09:56:07 -05:00
Aaron Tan
9e4655419e Fix flake8 E302 errors. 2016-11-15 20:59:39 -05:00
Aaron Tan
473ed016de Fix flake8 E305 errors. 2016-11-15 16:32:27 -05:00
Wayne Witzel III
530a5c0c88 merging devel 2016-10-03 10:35:50 -04:00
Wayne Witzel III
5faa21b72d add group_name to channel data 2016-09-27 18:39:14 -04:00
Wayne Witzel III
4c8aaf1aed converting from socketio to channels websocket 2016-09-27 18:39:07 -04:00
Chris Church
6ebe45b1bd Configure Tower in Tower:
* Add separate Django app for configuration: awx.conf.
* Migrate from existing main.TowerSettings model to conf.Setting.
* Add settings wrapper to allow get/set/del via django.conf.settings.
* Update existing references to tower_settings to use django.conf.settings.
* Add a settings registry to allow for each Django app to register configurable settings.
* Support setting validation and conversion using Django REST Framework fields.
* Add /api/v1/settings/ to display a list of setting categories.
* Add /api/v1/settings/<slug>/ to display all settings in a category as a single object.
* Allow PUT/PATCH to update setting singleton, DELETE to reset to defaults.
* Add "all" category to display all settings across categories.
* Add "changed" category to display only settings configured in the database.
* Support per-user settings via "user" category (/api/v1/settings/user/).
* Support defaults for user settings via "user-defaults" category (/api/v1/settings/user-defaults/).
* Update serializer metadata to support category, category_slug and placeholder on OPTIONS responses.
* Update serializer metadata to handle child fields of a list/dict.
* Hide raw data form in browsable API for OPTIONS and DELETE.
* Combine existing licensing code into single "TaskEnhancer" class.
* Move license helper functions from awx.api.license into awx.conf.license.
* Update /api/v1/config/ to read/verify/update license using TaskEnhancer and settings wrapper.
* Add support for caching settings accessed via settings wrapper.
* Invalidate cached settings when Setting model changes or is deleted.
* Preload all database settings into cache on first access via settings wrapper.
* Add support for read-only settings than can update their value depending on other settings.
* Use setting_changed signal whenever a setting changes.
* Register configurable authentication, jobs, system and ui settings.
* Register configurable LDAP, RADIUS and social auth settings.
* Add custom fields and validators for URL, LDAP, RADIUS and social auth settings.
* Rewrite existing validator for Credential ssh_private_key to support validating private keys, certs or combinations of both.
* Get all unit/functional tests working with above changes.
* Add "migrate_to_database_settings" command to determine settings to be migrated into the database and comment them out when set in Python settings files.
* Add support for migrating license key from file to database.
* Remove database-configuable settings from local_settings.py example files.
* Update setup role to no longer install files for database-configurable settings.

f 94ff6ee More settings work.
f af4c4e0 Even more db settings stuff.
f 96ea9c0 More settings, attempt at singleton serializer for settings.
f 937c760 More work on singleton/category views in API, add code to comment out settings in Python files, work on command to migrate settings to database.
f 425b0d3 Minor fixes for sprint demo.
f ea402a4 Add support for read-only settings, cleanup license engine, get license support working with DB settings.
f ec289e4 Rename migration, minor fixmes, update setup role.
f 603640b Rewrite key/cert validator, finish adding social auth fields, hook up signals for setting_changed, use None to imply a setting is not set.
f 67d1b5a Get functional/unit tests passing.
f 2919b62 Flake8 fixes.
f e62f421 Add redbaron to requirements, get file to database migration working (except for license).
f c564508 Add support for migrating license file.
f 982f767 Add support for regex in social map fields.
2016-09-26 22:14:47 -04:00
Wayne Witzel III
f7e9d07dad ensure CustomInventoryScripts render correctly in the ActivityStream 2016-07-11 15:25:35 -04:00
Matthew Jones
ae9b4d3e58 Revert "Fix up hook conditions for rbac activity stream"
This reverts commit 36c14f83bcb11fcdbd31140ce182ab87e3db4644.
2016-07-08 13:13:22 -04:00
Matthew Jones
1c860b81ac Fix up hook conditions for rbac activity stream 2016-07-08 13:03:34 -04:00
Matthew Jones
4c7f54cf72 Fix an activity stream associate with deleted obj
In some scenarios the activity stream associate could be invoked where
obj2 doesn't exist... the .get() will fail and tank the caller
preventing the save.   This guards that and blocks the activity stream
event, saving the save (whew!)
2016-07-08 12:56:52 -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
Wayne Witzel III
5456b209ac Merge pull request #2654 from wwitzel3/issue-2485
reduce activity stream noise
2016-06-27 15:47:59 -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
3697ddc2d0 fixing Role is None exception 2016-06-27 13:40:50 -04:00
Wayne Witzel III
e1853372f7 Adding comments to signals for rbac activity stream 2016-06-27 11:41:00 -04:00
Wayne Witzel III
5e2a3b3ef2 reduce activity stream noise by not including implicit role dis/associations 2016-06-27 11:28:06 -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
Matthew Jones
288ecc1c5b Ignore management jobs on activity stream 2016-06-23 16:14:56 -04:00
Matthew Jones
9e56913893 Capture some change info in activity stream for associate/disassociate events 2016-06-13 12:41:50 -04:00
Wayne Witzel III
db16478830 only special case team when sender is Role_parents 2016-06-10 17:27:11 -04:00
Wayne Witzel III
00698b82fc fix issue with Team.roles and ActivityStream 2016-06-10 17:03:55 -04:00
AlanCoding
39b410ae3e hide passwords in job_args and activity stream 2016-06-08 10:28:53 -04:00
Wayne Witzel III
61208f6a77 content_object can be None, that is what we care about 2016-05-26 15:45:16 -04:00
Wayne Witzel III
13f0b440c3 discover content type when object2 is a role 2016-05-26 15:45:10 -04:00
AlanCoding
9ed77508a7 fix naming problem with ActivityStream logging 2016-05-23 16:48:30 -04:00
Matthew Jones
5895b3a343 Refactor Notification's naming
Notifier -> NotificationTemplate
notifier -> notification_template
2016-05-05 13:53:46 -04:00
Wayne Witzel III
65f71ba2ab Fixing issue when Role is not associated with a Resource (generally never) 2016-05-03 13:32:40 -04:00
Wayne Witzel III
b78c3a3e61 Fix error when adding roles from the User.roles side 2016-05-03 11:55:40 -04:00
Wayne Witzel III
453a0aaff2 Implement ActivityStream for RBAC Roles 2016-05-03 10:16:04 -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
Chris Meyers
1925742da1 delete orphaned labels when jt or j deleted 2016-04-27 09:46:34 -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
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
6d8bab97df Only rebuild ancestor list on post_* events 2016-04-18 08:53:40 -04:00
Akita Noek
25303cf4ec Reverted user owner_role back to admin_role 2016-04-16 18:24:26 -04:00
Akita Noek
859d670fc8 Removed RolePermission stuff for Hosts 2016-04-15 10:59:15 -04:00
Akita Noek
6d34ca9d22 Proof of concept hacks for RolePermission elimination 2016-04-15 10:03:50 -04:00
Akita Noek
a0356afbac Improved code clarity and UI naming for user owner role creation
#1499
2016-04-12 16:11:45 -04:00
Akita Noek
c984b33f1e Fix erronous singleton role created for users
Needed to be just a normal role, ie with `name` assigned instead of
`singleton_name`

 Addresses #1499
2016-04-12 15:43:27 -04:00
Akita Noek
5741b47c54 Merge remote-tracking branch 'ansible/devel' into merge-devel 2016-03-18 15:40:13 -04:00
Akita Noek
67b37e17cb flake8 fixes 2016-03-16 08:54:59 -04:00
Akita Noek
e45982b011 Signal bindings to add permissions from hosts to groups/inventory
We should probably move this into a more generic system.. but for the
time being this works, we can refactor later if we have a similar need
elsewhere.
2016-03-15 14:47:36 -04:00
Akita Noek
b499555be4 Added auto_generated flag for RolePermissions 2016-03-15 13:36:28 -04:00
Akita Noek
6ea99583da Mass active flag code removal 2016-03-15 09:29:55 -04:00
Akita Noek
ba833d683e Active flag removal: switched from using mark_inactive to delete calls 2016-03-15 09:29:28 -04:00
Matthew Jones
eab223d229 Make sure we are covering system jobs and template on notifications 2016-03-11 15:11:08 -05:00
Wayne Witzel III
31a461956a Fixed up m2m_changed for rbac, added User.admin_role 2016-03-11 14:59:47 -05:00
Wayne Witzel III
94e8058127 Allow org.admin_role.members to administer org.member_role.members 2016-03-11 10:41:42 -05:00