Ejemplo n.º 1
0
    def get_permissions(self):
        if self.request.method in ['GET']:
            return [CanViewParentDictionary(), ]

        if self.request.method == 'DELETE' and self.is_hard_delete_requested():
            return [IsAdminUser(), ]

        return [CanEditParentDictionary(), ]
Ejemplo n.º 2
0
    def get_permissions(self):
        if self.request.method == 'POST':
            return [
                CanEditParentDictionary(),
            ]

        return [
            CanViewParentDictionary(),
        ]
Ejemplo n.º 3
0
    def get_permissions(self):
        if self.request.method in ['GET']:
            return [
                CanViewParentDictionary(),
            ]

        return [
            CanEditParentDictionary(),
        ]