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 2016/12/14 00:36:11 UTC
incubator-ponymail git commit: thread.lua fails to fetch rights for
private child of public parent
Repository: incubator-ponymail
Updated Branches:
refs/heads/master 46dd782c9 -> dccaf070a
thread.lua fails to fetch rights for private child of public parent
This fixes #296
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/dccaf070
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/dccaf070
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/dccaf070
Branch: refs/heads/master
Commit: dccaf070adefc41beb5c4ad326a93dac980f63c2
Parents: 46dd782
Author: Sebb <se...@apache.org>
Authored: Wed Dec 14 00:35:59 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Wed Dec 14 00:35:59 2016 +0000
----------------------------------------------------------------------
CHANGELOG.md | 1 +
site/api/thread.lua | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/dccaf070/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3cd6183..b23c970 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -63,6 +63,7 @@
- lib/aaa.lua various bugs (#140)
- lua modules should define local functions only (#294)
- inconsistent rights checking (#267)
+- thread.lua fails to fetch rights when fetching private child of public parent (#296)
## CHANGES in 0.9b:
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/dccaf070/site/api/thread.lua
----------------------------------------------------------------------
diff --git a/site/api/thread.lua b/site/api/thread.lua
index 91f0958..a0683cc 100644
--- a/site/api/thread.lua
+++ b/site/api/thread.lua
@@ -58,6 +58,9 @@ local function fetchChildren(r, pdoc, c, biglist, rights, account)
-- if we haven't seen this email before, check for its kids and add it to the bunch
local canAccess = true
if doc.private then
+ if account and not rights then
+ rights = aaa.rights(r, account)
+ end
canAccess = utils.canAccessDoc(doc, rights)
end
@@ -115,7 +118,7 @@ function handle(r)
-- did we find an email?
if doc then
local canAccess = false
- local rights = {}
+ local rights = nil
local account = user.get(r)
-- if private, can we access it?
if doc.private then