incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [25/38] git commit: [#6352] Added logging of roles and ACLs to debug spurious skipped notification issue
Date Fri, 21 Jun 2013 21:34:37 GMT
[#6352] Added logging of roles and ACLs to debug spurious skipped notification issue

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/153f6e39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/153f6e39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/153f6e39

Branch: refs/heads/cj/6272
Commit: 153f6e39bdd31e615474431d22da8d848a9ab86c
Parents: 24857cd
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Mon Jun 17 22:15:08 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Jun 18 17:51:14 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/notification.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/153f6e39/Allura/allura/model/notification.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/notification.py b/Allura/allura/model/notification.py
index 7c31a5c..29bcc81 100644
--- a/Allura/allura/model/notification.py
+++ b/Allura/allura/model/notification.py
@@ -242,6 +242,10 @@ class Notification(MappedClass):
                 not security.has_access(artifact, 'read', user)():
             log.debug("Skipping notification - User %s doesn't have read "
                       "access to artifact %s" % (user_id, str(self.ref_id)))
+            log.debug("User roles [%s]; artifact ACL [%s]; project ACL [%s]",
+                    ', '.join([str(r) for r in security.Credentials.get().user_roles(user_id=user_id,
project_id=c.project._id).reaching_ids]),
+                    ', '.join([str(a) for a in artifact.acl]),
+                    ', '.join([str(a) for a in c.project.acl]))
             return
         allura.tasks.mail_tasks.sendmail.post(
             destinations=[str(user_id)],
@@ -599,4 +603,4 @@ class MailFooter(object):
         return cls._render('mail/monitor_email_footer.txt',
             email=toaddr,
             app_url=app_url,
-            setting_url=setting_url)
\ No newline at end of file
+            setting_url=setting_url)


Mime
View raw message