fix(editorial): remove Facebook publishing and preview from editorial admin
Landwelle Gitea CI / Go tests and vet (push) Successful in 1m8s
Landwelle Gitea CI / JavaScript and deployment-script checks (push) Successful in 35s
Landwelle Gitea source ZIP / source-zip (push) Successful in 53s
Landwelle Gitea CI / Linux x64 production build (push) Successful in 1m38s

Preserve website publication scheduling, AI transparency, media picker, and legacy delivery history. Reject obsolete dispatch requests. Add integration and authenticated HTTP regression tests.
This commit is contained in:
Landwelle Server committed 2026-12-04 15:37:20 +01:00
1 parent 3c7b668cde
commit b9449dea31
19 files changed
+157 -337

No files matched your search

+16
View File
@@ -72,6 +72,22 @@ with (root/'portal.log').open('w+') as log:
with client.open(base+'/admin/media',timeout=30) as r:
assert r.status==200 and r.read()
print('HTTP 200 authenticated media gallery',flush=True)
for tab in ('contents','create','categories'):
with client.open(base+'/admin/editorial?tab='+tab,timeout=30) as r:
page=r.read().decode()
assert r.status==200 and 'Redaktionssystem' in page
assert 'data-facebook-' not in page and 'name="post_to_facebook"' not in page and 'value="publish_facebook"' not in page
if tab=='create':
assert 'name="publication_date"' in page and 'name="ai_usage"' in page and 'name="media_asset_id"' in page
import re
csrf=re.search(r'name="csrf_token" value="([^"]+)"',page).group(1)
print('HTTP 200 editorial '+tab+' without Facebook controls',flush=True)
try:
client.open(base+'/admin/editorial',data=urllib.parse.urlencode(dict(csrf_token=csrf,action='publish_facebook',id='1')).encode(),timeout=15)
raise AssertionError('obsolete Facebook action accepted')
except urllib.error.HTTPError as error:
assert error.code==400,error.code
print('HTTP 400 obsolete Facebook action rejected',flush=True)
finally:
p.terminate()
try:p.wait(timeout=20)