add user rights in rest api
authorStauros Kroustouris <staurosk@noc.grnet.gr>
Fri, 9 Jan 2015 08:10:19 +0000 (10:10 +0200)
committerStauros Kroustouris <staurosk@noc.grnet.gr>
Fri, 9 Jan 2015 08:10:19 +0000 (10:10 +0200)
flowspy/settings.py.dist

index c96e144..25e9c1f 100644 (file)
@@ -334,3 +334,10 @@ PEER_RANGE_MANAGED_TABLE = True
 PEER_TECHC_MANAGED_TABLE = True
 
 
+REST_FRAMEWORK = {
+    # Use Django's standard `django.contrib.auth` permissions,
+    # or allow read-only access for unauthenticated users.
+    'DEFAULT_PERMISSION_CLASSES': [
+        'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
+    ],
+}