Move editing links to editor role

main
Bob Mottram 2020-10-11 12:40:53 +01:00
parent ac6ad37c74
commit e9d0ee3227
2 changed files with 6 additions and 6 deletions

View File

@ -2727,10 +2727,10 @@ class PubServer(BaseHTTPRequestHandler):
# get the nickname
nickname = getNicknameFromActor(actorStr)
moderator = None
editor = None
if nickname:
moderator = isModerator(baseDir, nickname)
if not nickname or not moderator:
editor = isEditor(baseDir, nickname)
if not nickname or not editor:
if callingDomain.endswith('.onion') and \
onionDomain:
actorStr = \

View File

@ -1224,7 +1224,7 @@ def htmlEditLinks(translate: {}, baseDir: str, path: str,
return ''
# is the user a moderator?
if not isModerator(baseDir, nickname):
if not isEditor(baseDir, nickname):
return ''
cssFilename = baseDir + '/epicyon-links.css'
@ -1399,8 +1399,8 @@ def htmlEditNewsPost(translate: {}, baseDir: str, path: str,
editNewsPostForm += \
' <div class="container">\n'
editNewsPostForm += \
' <a href="' + pathOriginal + '/tlnews"><button class="cancelbtn">' + \
translate['Go Back'] + '</button></a>\n'
' <a href="' + pathOriginal + '/tlnews">' + \
'<button class="cancelbtn">' + translate['Go Back'] + '</button></a>\n'
editNewsPostForm += \
' <input type="submit" name="submitEditedNewsPost" value="' + \
translate['Submit'] + '">\n'