Custom permissions on viewset
<p>Im trying to find a way to create custom permissions on a viewset.
Im want to implement somthing like this :</p>

<pre><code>class ActivityViewSet(viewsets.ModelViewSet):
    queryset = Activity.objects.all()
    serializer_class = ActivitySerializer
    if request.method == 'PUT':
        permission_classes = (permissions.IsOwner)
    elif request.method == 'LIST':
        permission_classes = (permissions.IsAdmin)
    else :
        permission_classes = (permissions.AllowAny)
</code></pre>

<p>IE : sorting permissions by method. (the above code doesnt work cause "request" isnt recognized)</p>

<p>Couldn't find any use in the "Custom permissions" section of the documentation, but maybe Im just blind. (overriding BasePermission? how? who? where?)</p>

<p>Thanks :)</p>