Commit Graph

120 Commits

Author SHA1 Message Date
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
Chris Meyers
4c876b40e4 initial models and endpoints added for workflows 2016-08-30 15:05:28 -04:00
Akita Noek
a42986894f Made it so org auditors can see all users if ORG_ADMINS_CAN_SEE_ALL_USERS is true
Addresses #2706
2016-07-07 09:22:36 -04:00
Akita Noek
390ac656fa Bolted is_system_auditor faux-field onto User 2016-05-18 16:02:10 -04:00
Matthew Jones
5895b3a343 Refactor Notification's naming
Notifier -> NotificationTemplate
notifier -> notification_template
2016-05-05 13:53:46 -04:00
Akita Noek
7bfc8cd43b flake8 2016-04-15 17:22:48 -04:00
Wayne Witzel III
eae7349665 update access calls to new RBAC roles 2016-04-15 10:45:33 -04:00
Akita Noek
8887db231b Progress on ripping out RolePermissions 2016-04-14 09:44:20 -04:00
Akita Noek
6182dad0d4 Added activity stream events for User
Completes development for #1087
2016-04-11 17:03:04 -04:00
Akita Noek
3b233f828e Merge branch 'devel' of github.com:ansible/ansible-tower into rbac 2016-03-28 09:23:53 -04:00
Chris Meyers
d2de21ee50 job template labels init implementation 2016-03-24 15:26:14 -04:00
Akita Noek
5db7383a38 Bolt on organizations and admin_of_organizations properties to User model; fix related API endpoints
This partially mimics the old api feel, though doesn't enable searching
through these fields via ORM queries of course.
2016-03-22 13:13:41 -04:00
Akita Noek
7ec3b3b8b5 Fixed up User.accessible_objects to return a User queryset
Was returnning a RolePermission qs, needed to be a User qs to match.
Also bolted on the role_permissions GenericRelation so we could just
reuse the ResourceMixin accessible_objects code
2016-03-16 10:26:53 -04: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
55e071535b Added user role creation, accessible methods, and fixed up m2m_update 2016-03-11 07:07:17 -05:00
Wayne Witzel III
09d46f9336 test fixups and re-add can_access 2016-03-09 15:33:12 -05:00
Wayne Witzel III
39a1e893fb Merge branch 'rbac' of github.com:ansible/ansible-tower into rbac 2016-03-07 08:49:48 -05:00
Wayne Witzel III
a1cc5b06b8 Remove can_access methods and registration 2016-03-01 17:30:32 -05:00
Akita Noek
ea2cabe4d4 Merge branch 'devel' of github.com:ansible/ansible-tower into merge-devel 2016-03-01 15:09:58 -05:00
Chris Meyers
356b9c99b3 Merge branch 'mongoectomy_implementation' into devel 2016-03-01 08:22:40 -05:00
Wayne Witzel III
180911dfa8 Added UserResource 2016-02-24 14:09:56 -05:00
Akita Noek
b08809f7cc Initial RBAC API implementation 2016-02-22 16:21:56 -05:00
Matthew Jones
dde70dafec Refactor NotificationTemplate to Notifier 2016-02-17 15:18:18 +00:00
Chris Meyers
56b0da30f1 adds fact model 2016-02-15 15:39:22 -05:00
Matthew Jones
8db2f60405 Notification serializers, views, and tasks
* Implement concrete Notification model for notification runs
* Implement NotificationTemplate and Notification serializers and views
* Implement ancillary views
* Implement NotificationTemplate trigger m2m fields on all job templates
  via a fields mixin
* Link NotificationTemplates with an org
* Link notifications with the activity stream
* Implement Notification celery tasks
* Extend Backend field parameters to identify sender and receiver as
  parameters needed by the message and not the backend itself
* Updates to backends to better fit the django email backend model as it
  relates to Messages
* Implement success job chain task + notifications
* Implement notifications in error job chain task
2016-02-09 23:12:55 -05:00
Matthew Jones
7385efef35 Adding some early Notifications stubs
* A basic NotificationTemplate model class with early notification type
  definitions
* Initial implementations of the Email, Slack, and Twilio Notification
  backends using the Django email backend system
* Some dependencies thereof
2016-02-04 15:52:23 -05:00
Akita Noek
00619b7e36 Initial RBAC field and model definitions 2016-02-04 15:12:24 -05:00
Matthew Jones
f53f3d805d View and some validation logic for database config
* Fixing some bugs in the manifest definition
* Database model and schema migration for tower settings
* Initial View and Serializer implementation using a strategy of merging
  model instances and named tuples
2015-12-11 16:57:11 -05:00
John Mitchell
32d1c0e4db fixed copyright date 2015-06-11 16:10:23 -04:00
Matthew Jones
b3da3b34a3 Changing some legal headers for python source files 2015-05-29 12:10:39 -04:00
Chris Church
f7b8d510dc Implement support for ad hoc commands. 2015-03-30 13:04:19 -04:00
Matthew Jones
6a18a50d99 Fixing flake8 errors, this should be almost all of them! 2015-02-11 16:42:55 -05:00
Matthew Jones
017d42364b Add Custom Inventory Script to the activity stream from the api side 2014-12-10 11:33:22 -05:00
Luke Sneeringer
072ab2118f Instance model (for HA) 2014-10-20 08:04:15 -05:00
Chris Church
bfb0159083 AC-1071 Moved credential model to its own file. Added API support and tests for ssh_key_path field.
AC-1095 Added validation for SSH private keys.
2014-03-26 16:06:02 -04:00
Chris Church
296e87a632 AC-1040 Removed extra model definitions used for generating migrations. 2014-03-25 09:38:25 -04:00
Chris Church
02af35dffd AC-1040 Updates to get unit tests to pass. 2014-03-24 18:13:53 -04:00
Chris Church
0ee5c07738 AC-1040 Update jobs models and migrations (work in progress). 2014-03-24 17:02:43 -04:00
Chris Church
2b7af0a2ec Happy new year!!! 2014-01-02 11:51:43 -05:00
Matthew Jones
61059fa1a4 Work to complete AC-673, mass refactoring of the activity stream. Some work towards AC-664/662 but will complete on those issues. This also fixes issue AC-743 (Adding help text for OPTIONS requests) and AC-675 (updates where active changes to False will now be treated as deletes) 2013-12-10 16:08:35 -05:00
Matthew Jones
c039fc4a1f Remove JobHostSummary and JobEvent actions from the activity stream registry 2013-11-20 21:19:26 -05:00
Chris Church
b8edfab481 Fixed unit test error caused by extra definition of ActivityStream model. Rearranged imports of signal handlers. 2013-11-18 22:54:52 -05:00
Matthew Jones
a1edfe0dc2 Move ActivityStream to it's own model file 2013-11-12 17:01:15 -05:00
Matthew Jones
b7b22fa7f8 Catch some errors that pop up during ActivityStream testing 2013-11-12 17:01:15 -05:00
Matthew Jones
2ab4cab495 Fix some inconsistencies after the merge 2013-11-12 17:01:15 -05:00
Matthew Jones
3a02c17d2a Initial backend implementation for AC-25, activity stream/audit love 2013-11-12 17:01:15 -05:00
Chris Church
b1e7252e66 Refactored models into separate files. 2013-11-07 12:40:11 -05:00
Chris Church
56a4bc8d3a AC-543 Removed comment print statements. 2013-11-06 22:47:13 -05:00
Chris Church
fb13da86cf AC-543 Add credential model validation for unique constraint with nullable fields. 2013-11-06 22:25:36 -05:00
Chris Church
98883e771f Moved API code into separate Django app. 2013-11-04 15:44:49 -05:00