get permissions

Solutions on MaxInterview for get permissions by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "get permissions"
Jannik
13 Sep 2016
1def get_permissions(self):
2    # Your logic should be all here
3    if self.request.method == 'GET':
4        self.permission_classes = [DummyPermission, ]
5    else:
6        self.permission_classes = [IsAuthenticated, ]
7
8    return super(UsersViewSet, self).get_permissions()
9