Пример #1
0
 def get_permissions(self):
     if self.action == 'list':
         permission_classes = get_user_permission_classes('terminal.terminal_list_data', self.request)
     if self.action == 'retrieve':
         permission_classes = get_user_permission_classes('terminal.terminal_detail', self.request)
     if self.action == 'update':
         permission_classes = get_user_permission_classes('terminal.terminal_edit', self.request)
     return [permission() for permission in permission_classes]
Пример #2
0
 def get_permissions(self):
     permission_classes = []
     if self.action == 'list':
         permission_classes = get_user_permission_classes(
             'merchant.merchant_list_data', self.request)
     if self.action == 'retrieve':
         permission_classes = get_user_permission_classes(
             'merchant.merchant_detail', self.request)
     return [permission() for permission in permission_classes]
Пример #3
0
 def get_permissions(self):
     if self.action == 'list':
         permission_classes = get_user_permission_classes(
             'sale_promotion_form.sale_promotion_list_data', self.request)
     if self.action == 'retrieve':
         permission_classes = get_user_permission_classes(
             'sale_promotion_form.sale_promotion_detail', self.request)
     if self.action == 'update':
         permission_classes = get_user_permission_classes(
             'sale_promotion_form.sale_promotion_edit', self.request)
     return [permission() for permission in permission_classes]
Пример #4
0
 def get_permissions(self):
     permission_classes = []
     if self.action == 'list':
         permission_classes = get_user_permission_classes(
             'shop.shop_list_data', self.request)
     if self.action == 'retrieve':
         permission_classes = get_user_permission_classes(
             'shop.shop_detail', self.request)
     if self.action == 'create':
         permission_classes = get_user_permission_classes(
             'shop.shop_create', self.request)
     if self.action == 'update':
         permission_classes = get_user_permission_classes(
             'shop.shop_edit', self.request)
     return [permission() for permission in permission_classes]
Пример #5
0
 def get_permissions(self):
     if self.action == 'list':
         permission_classes = get_user_permission_classes(
             'team.team_list_data', self.request)
     if self.action == 'retrieve':
         permission_classes = get_user_permission_classes(
             'team.team_detail', self.request)
     if self.action == 'create':
         permission_classes = get_user_permission_classes(
             'team.team_create', self.request)
     if self.action == 'update':
         permission_classes = get_user_permission_classes(
             'team.team_edit', self.request)
     if self.action == 'destroy':
         permission_classes = get_user_permission_classes(
             'team.team_delete', self.request)
     return [permission() for permission in permission_classes]
Пример #6
0
 def get_permissions(self):
     if self.action == 'list':
         permission_classes = get_user_permission_classes(
             'exchange_point_pos365.list_exchange_point_pos365_config',
             self.request)
     else:
         permission_classes = [IsAuthenticated]
     return [permission() for permission in permission_classes]
Пример #7
0
 def get_permissions(self):
     if self.action == 'list':
         permission_classes = get_user_permission_classes(
             'cronjob_log.cronjob_list_log', self.request)
     return [permission() for permission in permission_classes]