def get(self, request, id): if is_fresher(request.user): return self._fresher_get(request, id) elif is_helper(request.user): return self._helper_get(request, id) elif is_committee(request.user): pass else: raise PermissionDenied()
def test_func(self): """Only committee have access.""" return is_committee(self.request.user)
def jumpstart_check(user): return is_committee(user) or is_fresher(user) or is_helper(user)