Skip to content

Commit 7f03825

Browse files
committed
Change authorization class for ProjectResource
1 parent c6be7a1 commit 7f03825

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readthedocs/api/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from django.core.cache import cache
1313
from django.shortcuts import get_object_or_404
1414
from tastypie import fields
15-
from tastypie.authorization import DjangoAuthorization
15+
from tastypie.authorization import DjangoAuthorization, ReadOnlyAuthorization
1616
from tastypie.constants import ALL, ALL_WITH_RELATIONS
1717
from tastypie.http import HttpCreated
1818
from tastypie.resources import ModelResource
@@ -39,7 +39,7 @@ class Meta(object):
3939
allowed_methods = ['get', 'post', 'put']
4040
queryset = Project.objects.api()
4141
authentication = PostAuthentication()
42-
authorization = DjangoAuthorization()
42+
authorization = ReadOnlyAuthorization()
4343
excludes = ['path', 'featured', 'programming_language']
4444
filtering = {
4545
'users': ALL_WITH_RELATIONS,

0 commit comments

Comments
 (0)