Split out RBAC and can_user_* methods from models into access.py. Moved list/item permissions checks from the base views into RBAC. Added serializers/views/tests for jobs REST API.

This commit is contained in:
Chris Church
2013-05-08 10:46:16 -04:00
parent 75ea4a1cda
commit 2a15d07221
12 changed files with 1481 additions and 874 deletions

View File

@@ -39,6 +39,7 @@ MANAGERS = ADMINS
REST_FRAMEWORK = {
'FILTER_BACKEND': 'lib.main.custom_filters.CustomFilterBackend',
'DEFAULT_PAGINATION_SERIALIZER_CLASS': 'lib.main.serializers.PaginationSerializer',
'PAGINATE_BY': 25,
'PAGINATE_BY_PARAM': 'page_size',
'DEFAULT_AUTHENTICATION_CLASSES': (
@@ -236,5 +237,10 @@ LOGGING = {
# Comment the line below to show lots of permissions logging.
'propagate': False,
},
'lib.main.access': {
'handlers': ['null'],
# Comment the line below to show lots of permissions logging.
'propagate': False,
},
}
}