Check for news editor

merge-requests/30/head
Bob Mottram 2020-10-10 22:03:12 +01:00
parent 41c7d814ad
commit 233f8440c6
1 changed files with 3 additions and 8 deletions

View File

@ -4592,17 +4592,13 @@ def individualPostAsHtml(allowDownloads: bool,
print('TIMING INDIV ' + boxName + ' 11 = ' + str(timeDiff))
editStr = ''
print('EDIT TEST 1')
if postJsonObject['actor'].endswith(fullDomain + '/users/' + nickname) or \
postJsonObject['actor'].endswith(fullDomain + '/users/news'):
print('EDIT TEST 2')
if (postJsonObject['actor'].endswith(fullDomain + '/users/' + nickname) or
(isEditor(baseDir, nickname) and
postJsonObject['actor'].endswith(fullDomain + '/users/news'))):
if '/statuses/' in postJsonObject['object']['id']:
print('EDIT TEST 3')
if isBlogPost(postJsonObject):
print('EDIT TEST 4')
blogPostId = postJsonObject['object']['id']
if not isNewsPost(postJsonObject):
print('EDIT TEST 5')
editStr += \
' ' + \
'<a class="imageAnchor" href="/users/' + \
@ -4616,7 +4612,6 @@ def individualPostAsHtml(allowDownloads: bool,
translate['Edit blog post'] + \
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
else:
print('EDIT TEST 6')
editStr += \
' ' + \
'<a class="imageAnchor" href="/users/' + \