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 01:22:39 UTC
incubator-ponymail git commit: Simplify; merge account checks
Repository: incubator-ponymail
Updated Branches:
refs/heads/master dccaf070a -> 1021641c7
Simplify; merge account checks
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/1021641c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/1021641c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/1021641c
Branch: refs/heads/master
Commit: 1021641c77e42fb99829c085639518f6c2a03b50
Parents: dccaf07
Author: Sebb <se...@apache.org>
Authored: Wed Dec 14 01:22:28 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Wed Dec 14 01:22:28 2016 +0000
----------------------------------------------------------------------
site/api/stats.lua | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/1021641c/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 20b10d0..eeed145 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -575,19 +575,20 @@ function handle(r)
for k = #dhh, 1, -1 do
local v = dhh[k]
local email = v._source
- local canUse = true
local eepoch = tonumber(email.epoch)
if eepoch > lastEmail then
lastEmail = eepoch
end
+ local canUse = false
if email.private then
- if account and not rights then
- rights = aaa.rights(r, account)
- end
- canUse = false
if account then
+ if not rights then
+ rights = aaa.rights(r, account)
+ end
canUse = utils.canAccessDoc(email, rights)
end
+ else
+ canUse = true
end
if canUse then