|
a/Allura/allura/model/discuss.py |
|
b/Allura/allura/model/discuss.py |
|
... |
|
... |
200 |
text=text,
|
200 |
text=text,
|
201 |
status='pending')
|
201 |
status='pending')
|
202 |
if timestamp is not None: kwargs['timestamp'] = timestamp
|
202 |
if timestamp is not None: kwargs['timestamp'] = timestamp
|
203 |
if message_id is not None: kwargs['_id'] = message_id
|
203 |
if message_id is not None: kwargs['_id'] = message_id
|
204 |
post = self.post_class()(**kwargs)
|
204 |
post = self.post_class()(**kwargs)
|
|
|
205 |
if hasattr(self.artifact, 'post_sent'):
|
|
|
206 |
self.artifact.post_sent(post)
|
205 |
if ignore_security or has_access(self, 'unmoderated_post')():
|
207 |
if ignore_security or has_access(self, 'unmoderated_post')():
|
206 |
log.info('Auto-approving message from %s', c.user.username)
|
208 |
log.info('Auto-approving message from %s', c.user.username)
|
207 |
file_info = kw.get('file_info', None)
|
209 |
file_info = kw.get('file_info', None)
|
208 |
post.approve(file_info)
|
210 |
post.approve(file_info)
|
209 |
else:
|
211 |
else:
|