diff --git a/taiga/base/routers.py b/taiga/base/routers.py index d60f8fc3..19e69dc2 100644 --- a/taiga/base/routers.py +++ b/taiga/base/routers.py @@ -295,13 +295,6 @@ class DRFDefaultRouter(SimpleRouter): class DefaultRouter(DRFDefaultRouter): - routes = [ - Route( - url=r'^{prefix}/(?P\d+)/restore/(?P\d+)$', - mapping={'post': 'restore'}, - name='{basename}-restore', - initkwargs={} - ) - ] + DRFDefaultRouter.routes + pass __all__ = ["DefaultRouter"] diff --git a/taiga/projects/api.py b/taiga/projects/api.py index 0904ff25..b012df6f 100644 --- a/taiga/projects/api.py +++ b/taiga/projects/api.py @@ -148,7 +148,7 @@ class MembershipViewSet(ModelCrudViewSet): email.send() -class InvitationViewSet(RetrieveModelMixin, viewsets.GenericViewSet): +class InvitationViewSet(RetrieveModelMixin, viewsets.ReadOnlyModelViewSet): """ Only used by front for get invitation by it token. """ @@ -157,6 +157,9 @@ class InvitationViewSet(RetrieveModelMixin, viewsets.GenericViewSet): lookup_field = "token" permission_classes = (AllowAny,) + def list(self, *args, **kwargs): + raise exc.PermissionDenied(_("You don't have permisions to see that.")) + class RolesViewSet(ModelCrudViewSet): model = Role