Renamed some API files/classes to mimic REST framework names, moved queryset filtering for permissions alongside other permissions/access checks, cleaned up base views to handle get_queryset based on class attributes, cleaned up post to sublist to create/attach/unattach.

This commit is contained in:
Chris Church
2013-07-19 00:33:56 -04:00
parent 401317cf41
commit a6c767907e
11 changed files with 494 additions and 852 deletions

View File

@@ -147,8 +147,11 @@ REST_FRAMEWORK = {
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'awx.main.permissions.ModelAccessPermission',
),
'DEFAULT_FILTER_BACKENDS': (
'awx.main.custom_filters.CustomFilterBackend',
'awx.main.filters.DefaultFilterBackend',
),
'DEFAULT_PARSER_CLASSES': (
'rest_framework.parsers.JSONParser',
@@ -323,7 +326,7 @@ LOGGING = {
'handlers': ['console', 'file', 'syslog'],
'level': 'DEBUG',
},
'awx.main.rbac': {
'awx.main.permissions': {
'handlers': ['null'],
# Comment the line below to show lots of permissions logging.
'propagate': False,