def check_view_permissions(self):
        """
        Returns True if the user has required permissions.
        """
        if ('metadata', 'list', 'retrieve') in self.action:
            # Every authenticated user can see the metadata and list or
            # retrieve groups. Anonymous users can do so if they are enabled.
            result = self.request.user.is_authenticated() or config['general_system_enable_anonymous']
        elif self.action in ('create', 'partial_update', 'update', 'destroy'):
            # Users with all app permissions can edit groups.
            result = (self.request.user.has_perm('users.can_see_name') and
                      self.request.user.has_perm('users.can_see_extra_data') and
                      self.request.user.has_perm('users.can_manage'))
        else:
            # Deny request in any other case.
            result = False
        return result
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/users/views.py/GroupViewSet.check_view_permissions/swapped operands of `in`