2

How can I add IsAdminUser permissions to /o/applications/* views in Django OAuth Toolkit?

REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAdminUser',
    )
}

in my settings.py doesn't work with Django OAuth Toolkit views, also I modify ApplicationList in my view.py doesn't work:

class ApplicationList:
    permission_classes = (permissions.IsAdminUser,)

I'm kind of newby to Django and Python so I will be glad for your help

pstrag
  • 597
  • 4
  • 16
  • instead of combining all the views you can have seperate adminvies and urls and use decorators to restrict the access – sundar nataraj Jul 21 '14 at 10:21
  • but how can I add decorator to views from Django OAuth Toolkit? Can you write step-by-step instruction? – pstrag Jul 21 '14 at 11:04

0 Answers0