You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2022/01/29 12:22:53 UTC
[incubator-ponymail-foal] branch master updated (279302b -> 4809cc2)
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from 279302b WIP committed in error
new 532c917 hide_deleted unused and should be deleted
new 4809cc2 Bump server version
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
server/plugins/messages.py | 6 ++----
server/server_version.py | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
[incubator-ponymail-foal] 01/02: hide_deleted unused and should be deleted
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 532c917d2479d0c291ab8f01f91e2af1268b4be0
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jan 29 12:21:40 2022 +0000
hide_deleted unused and should be deleted
This fixes #220
---
server/plugins/messages.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/server/plugins/messages.py b/server/plugins/messages.py
index bb7fd08..2f319e4 100644
--- a/server/plugins/messages.py
+++ b/server/plugins/messages.py
@@ -341,7 +341,6 @@ async def get_source(session: plugins.session.SessionObject, permalink: str, raw
async def query_batch(
session: plugins.session.SessionObject,
query_defuzzed: dict,
- hide_deleted: bool = True,
metadata_only: bool = False,
epoch_order: str = "desc",
source_fields: typing.Optional[typing.List[str]] = None
@@ -375,7 +374,8 @@ async def query_batch(
for hit in hits:
doc = hit["_source"]
# If email was delete/hidden and we're not doing an admin query, ignore it
- if hide_deleted and doc.get("deleted", False):
+ is_admin = session.credentials and session.credentials.admin
+ if doc.get("deleted", False) and not is_admin:
continue
if plugins.aaa.can_access_email(session, doc):
if "mid" in doc: # might be missing when using source_fields
@@ -409,7 +409,6 @@ async def query(
session: plugins.session.SessionObject,
query_defuzzed: dict,
query_limit: int,
- hide_deleted: bool = True,
metadata_only: bool = False,
epoch_order: str = "desc",
source_fields: typing.Optional[typing.List[str]] = None
@@ -423,7 +422,6 @@ async def query(
async for batch in query_batch(
session,
query_defuzzed,
- hide_deleted=hide_deleted,
metadata_only=metadata_only,
epoch_order=epoch_order,
source_fields=source_fields
[incubator-ponymail-foal] 02/02: Bump server version
Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 4809cc25753af0a093a2b0e7a735849c7a5d37e1
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jan 29 12:22:31 2022 +0000
Bump server version
---
server/server_version.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/server_version.py b/server/server_version.py
index dacf535..fb1f927 100644
--- a/server/server_version.py
+++ b/server/server_version.py
@@ -1,2 +1,2 @@
# This file is generated by server/update_version.sh
-PONYMAIL_SERVER_VERSION = '3db5579'
+PONYMAIL_SERVER_VERSION = '532c917'