mirror of https://gitlab.com/bashrc2/epicyon
Edit list of nicknames permitted to post to the newswire
parent
8ec06c612b
commit
6997ae6e96
11
daemon.py
11
daemon.py
|
@ -2893,6 +2893,17 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if os.path.isfile(newswireFilename):
|
||||
os.remove(newswireFilename)
|
||||
|
||||
newswireTrustedFilename = baseDir + '/accounts/newswiretrusted.txt'
|
||||
if fields.get('trustedNewswire'):
|
||||
newswireTrusted = fields['trustedNewswire']
|
||||
trustFile = open(newswireTrustedFilename, "w+")
|
||||
if trustFile:
|
||||
trustFile.write(newswireTrusted)
|
||||
trustFile.close()
|
||||
else:
|
||||
if os.path.isfile(newswireTrustedFilename):
|
||||
os.remove(newswireTrustedFilename)
|
||||
|
||||
# redirect back to the default timeline
|
||||
if callingDomain.endswith('.onion') and \
|
||||
onionDomain:
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "تغذية RSS لهذا الموقع",
|
||||
"Edit newswire": "تحرير الأخبار",
|
||||
"Add RSS feed links below.": "إضافة روابط تغذية RSS أدناه.",
|
||||
"Newswire RSS Feed": "Newswire موجز RSS"
|
||||
"Newswire RSS Feed": "Newswire موجز RSS",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Feed RSS per a aquest lloc",
|
||||
"Edit newswire": "Editeu newswire",
|
||||
"Add RSS feed links below.": "Afegiu enllaços de canals RSS a continuació.",
|
||||
"Newswire RSS Feed": "Feed RSS de Newswire"
|
||||
"Newswire RSS Feed": "Feed RSS de Newswire",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Porthiant RSS ar gyfer y wefan hon",
|
||||
"Edit newswire": "Golygu newyddion",
|
||||
"Add RSS feed links below.": "Ychwanegwch ddolenni porthiant RSS isod.",
|
||||
"Newswire RSS Feed": "Newswire RSS Feed"
|
||||
"Newswire RSS Feed": "Newswire RSS Feed",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "RSS-Feed für diese Site",
|
||||
"Edit newswire": "Newswire bearbeiten",
|
||||
"Add RSS feed links below.": "Fügen Sie unten RSS-Feed-Links hinzu.",
|
||||
"Newswire RSS Feed": "Newswire RSS Feed"
|
||||
"Newswire RSS Feed": "Newswire RSS Feed",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "RSS feed for this site",
|
||||
"Edit newswire": "Edit newswire",
|
||||
"Add RSS feed links below.": "Add RSS feed links below.",
|
||||
"Newswire RSS Feed": "Newswire RSS Feed"
|
||||
"Newswire RSS Feed": "Newswire RSS Feed",
|
||||
"Nicknames whose blog entries appear on the newswire.": "Nicknames whose blog entries appear on the newswire."
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Fuente RSS para este sitio",
|
||||
"Edit newswire": "Editar newswire",
|
||||
"Add RSS feed links below.": "Agregue los enlaces de fuentes RSS a continuación.",
|
||||
"Newswire RSS Feed": "Canal RSS de Newswire"
|
||||
"Newswire RSS Feed": "Canal RSS de Newswire",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Flux RSS de ce site",
|
||||
"Edit newswire": "Modifier le fil d'actualité",
|
||||
"Add RSS feed links below.": "Ajoutez des liens de flux RSS ci-dessous.",
|
||||
"Newswire RSS Feed": "Flux RSS de Newswire"
|
||||
"Newswire RSS Feed": "Flux RSS de Newswire",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Fotha RSS don láithreán seo",
|
||||
"Edit newswire": "Cuir sreang nuachta in eagar",
|
||||
"Add RSS feed links below.": "Cuir naisc beatha RSS thíos.",
|
||||
"Newswire RSS Feed": "Newswire RSS Feed"
|
||||
"Newswire RSS Feed": "Newswire RSS Feed",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "इस साइट के लिए आरएसएस फ़ीड",
|
||||
"Edit newswire": "नवांश संपादित करें",
|
||||
"Add RSS feed links below.": "नीचे आरएसएस फ़ीड लिंक जोड़ें।",
|
||||
"Newswire RSS Feed": "Newswire RSS फ़ीड"
|
||||
"Newswire RSS Feed": "Newswire RSS फ़ीड",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Feed RSS per questo sito",
|
||||
"Edit newswire": "Modifica newswire",
|
||||
"Add RSS feed links below.": "Aggiungi i link ai feed RSS di seguito.",
|
||||
"Newswire RSS Feed": "Feed RSS di Newswire"
|
||||
"Newswire RSS Feed": "Feed RSS di Newswire",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "このサイトのRSSフィード",
|
||||
"Edit newswire": "ニュースワイヤーを編集",
|
||||
"Add RSS feed links below.": "以下にRSSフィードリンクを追加します。",
|
||||
"Newswire RSS Feed": "NewswireRSSフィード"
|
||||
"Newswire RSS Feed": "NewswireRSSフィード",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -292,5 +292,6 @@
|
|||
"RSS feed for this site": "RSS feed for this site",
|
||||
"Edit newswire": "Edit newswire",
|
||||
"Add RSS feed links below.": "Add RSS feed links below.",
|
||||
"Newswire RSS Feed": "Newswire RSS Feed"
|
||||
"Newswire RSS Feed": "Newswire RSS Feed",
|
||||
"Nicknames whose blog entries appear on the newswire.": "Nicknames whose blog entries appear on the newswire."
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "Feed RSS para este site",
|
||||
"Edit newswire": "Editar notícias",
|
||||
"Add RSS feed links below.": "Adicione links de feed RSS abaixo.",
|
||||
"Newswire RSS Feed": "Feed RSS da Newswire"
|
||||
"Newswire RSS Feed": "Feed RSS da Newswire",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "RSS-канал для этого сайта",
|
||||
"Edit newswire": "Редактировать ленту новостей",
|
||||
"Add RSS feed links below.": "Добавьте ссылки на RSS-канал ниже.",
|
||||
"Newswire RSS Feed": "Лента новостей RSS"
|
||||
"Newswire RSS Feed": "Лента новостей RSS",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -296,5 +296,6 @@
|
|||
"RSS feed for this site": "该站点的RSS feed",
|
||||
"Edit newswire": "编辑新闻专线",
|
||||
"Add RSS feed links below.": "在下面添加RSS feed链接。",
|
||||
"Newswire RSS Feed": "Newswire RSS提要"
|
||||
"Newswire RSS Feed": "Newswire RSS提要",
|
||||
"Nicknames whose blog entries appear on the newswire.": ""
|
||||
}
|
||||
|
|
|
@ -1326,6 +1326,13 @@ def htmlEditNewswire(translate: {}, baseDir: str, path: str,
|
|||
with open(newswireFilename, 'r') as fp:
|
||||
newswireStr = fp.read()
|
||||
|
||||
# get the list of handles who are trusted to post to the newswire
|
||||
newswireTrusted = ''
|
||||
newswireTrustedFilename = baseDir + '/accounts/newswiretrusted.txt'
|
||||
if os.path.isfile(newswireTrustedFilename):
|
||||
with open(newswireTrustedFilename, "r") as trustFile:
|
||||
newswireTrusted = trustFile.read()
|
||||
|
||||
editNewswireForm += \
|
||||
'<div class="container">'
|
||||
editNewswireForm += \
|
||||
|
@ -1335,6 +1342,15 @@ def htmlEditNewswire(translate: {}, baseDir: str, path: str,
|
|||
editNewswireForm += \
|
||||
' <textarea id="message" name="editedNewswire" ' + \
|
||||
'style="height:500px">' + newswireStr + '</textarea>'
|
||||
|
||||
editNewswireForm += \
|
||||
' ' + \
|
||||
translate['Nicknames whose blog entries appear on the newswire.'] + \
|
||||
'<br>'
|
||||
editNewswireForm += \
|
||||
' <textarea id="message" name="trustedNewswire" ' + \
|
||||
'style="height:500px">' + newswireTrusted + '</textarea>'
|
||||
|
||||
editNewswireForm += \
|
||||
'</div>'
|
||||
|
||||
|
|
Loading…
Reference in New Issue