aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpettet <rush@wikimedia.org>2014-11-22 14:03:04 -0600
committercpettet <rush@wikimedia.org>2014-11-22 15:15:17 -0600
commit5775f5cb06bcbc65b04ef96c4876f3183e7d2dd2 (patch)
tree3bc51229bc77c01b4ad8e23ea9721f40d43408df
parentd812b51aaa8835325d44cbba9f2e69ff025fddeb (diff)
maintain privacy for comments on user assignment
-rwxr-xr-xbugzilla_update_user_comments.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bugzilla_update_user_comments.py b/bugzilla_update_user_comments.py
index 9f92191..bff2192 100755
--- a/bugzilla_update_user_comments.py
+++ b/bugzilla_update_user_comments.py
@@ -58,10 +58,18 @@ def update(user):
for key, xi in xcoms.iteritems():
com = coms[util.get_index(coms, "count", int(key))]
content = com['text']
+
+ if com['is_private']:
+ vlog('is private')
+ comment_content = bzlib.security_mask
+ else:
+ vlog('is NOT private')
+ comment_content = content + xi['xattached']
+
if com["creator"] == user['user']:
log("Updating comment %s for %s" % (xi['xctransaction'], user['user']))
phabdb.set_comment_author(xi['xctransaction'], user['userphid'])
- phabdb.set_comment_content(xi['xctransaction'], content + xi['xattached'])
+ phabdb.set_comment_content(xi['xctransaction'], comment_content)
current = phabdb.get_user_migration_comment_history(user['user'], pmig)
if current: