mirror of https://gitlab.com/bashrc2/epicyon
Check that the editor is the admin
parent
d78139a258
commit
67ea679887
39
daemon.py
39
daemon.py
|
@ -2908,25 +2908,28 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if os.path.isfile(linksFilename):
|
if os.path.isfile(linksFilename):
|
||||||
os.remove(linksFilename)
|
os.remove(linksFilename)
|
||||||
|
|
||||||
if fields.get('editedAbout'):
|
adminNickname = \
|
||||||
aboutStr = fields['editedAbout']
|
getConfigParam(baseDir, 'admin')
|
||||||
aboutFile = open(aboutFilename, "w+")
|
if nickname == adminNickname:
|
||||||
if aboutFile:
|
if fields.get('editedAbout'):
|
||||||
aboutFile.write(aboutStr)
|
aboutStr = fields['editedAbout']
|
||||||
aboutFile.close()
|
aboutFile = open(aboutFilename, "w+")
|
||||||
else:
|
if aboutFile:
|
||||||
if os.path.isfile(aboutFilename):
|
aboutFile.write(aboutStr)
|
||||||
os.remove(aboutFilename)
|
aboutFile.close()
|
||||||
|
else:
|
||||||
|
if os.path.isfile(aboutFilename):
|
||||||
|
os.remove(aboutFilename)
|
||||||
|
|
||||||
if fields.get('editedTOS'):
|
if fields.get('editedTOS'):
|
||||||
TOSStr = fields['editedTOS']
|
TOSStr = fields['editedTOS']
|
||||||
TOSFile = open(TOSFilename, "w+")
|
TOSFile = open(TOSFilename, "w+")
|
||||||
if TOSFile:
|
if TOSFile:
|
||||||
TOSFile.write(TOSStr)
|
TOSFile.write(TOSStr)
|
||||||
TOSFile.close()
|
TOSFile.close()
|
||||||
else:
|
else:
|
||||||
if os.path.isfile(TOSFilename):
|
if os.path.isfile(TOSFilename):
|
||||||
os.remove(TOSFilename)
|
os.remove(TOSFilename)
|
||||||
|
|
||||||
# redirect back to the default timeline
|
# redirect back to the default timeline
|
||||||
if callingDomain.endswith('.onion') and \
|
if callingDomain.endswith('.onion') and \
|
||||||
|
|
Loading…
Reference in New Issue