def _available_permissions(self):
        """Return all permissions we have through user group membership.

        This method is used by the ``has_{add|change|delete}_permission()``
        methods. They have to determine whether we have rights to
        add/change/delete *some* instance of the model we're the admin for. So
        we don't have to look at data sets, only at which permissions are
        somehow connected to the user groups we're a member of.

        """
        user_group_ids = getattr(tls_request, USER_GROUP_IDS, None)
        if user_group_ids:
            permissions = Permission.objects.filter(
                group__permissionmapper__user_group__id__in=user_group_ids)
            permissions = [(perm.content_type.app_label + '.' + perm.codename)
                           for perm in permissions]
            return permissions
        return []