remove forum_enabled toggle: subscribing IS trusting, no intermediate state
This commit is contained in:
parent
b3426b2494
commit
3f00554f09
3 changed files with 1 additions and 18 deletions
|
|
@ -210,7 +210,7 @@ Enable it on the `/style` page under "Forum". A "Forum" link will appear in the
|
||||||
- Auto-discovery can be disabled in the moderation page
|
- Auto-discovery can be disabled in the moderation page
|
||||||
- Threads are auto-pruned after 30 days (configurable, or set to 0 to keep everything)
|
- Threads are auto-pruned after 30 days (configurable, or set to 0 to keep everything)
|
||||||
- Moderation is local: block authors, mute threads, keyword filters, and gossip block lists with peers (auto-block after 3 peer reports)
|
- Moderation is local: block authors, mute threads, keyword filters, and gossip block lists with peers (auto-block after 3 peer reports)
|
||||||
- **Trust circle** — Content is gated by a trust graph derived from your TinyWeb subscriptions. Each subscription has a "forum" toggle — enable it to include that peer's forum content (and their transitive trust network). Blocking a peer cascades: their downstream trust network is removed from your view. New identities have no trust path until a trusted peer vouches for them.
|
- **Trust circle** — Content is gated by a trust graph derived from your TinyWeb subscriptions. Each subscribed peer's forum content (and their transitive trust network) enters your view automatically. Blocking a peer cascades: their downstream trust network is removed from your view.
|
||||||
|
|
||||||
For full feature docs, see the [tinyweb-forum README](https://codeberg.org/tinyweb/tinyweb-forum).
|
For full feature docs, see the [tinyweb-forum README](https://codeberg.org/tinyweb/tinyweb-forum).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ from .subscriptions import (
|
||||||
handle_subscriptions, handle_subscription_add, handle_subscription_browse,
|
handle_subscriptions, handle_subscription_add, handle_subscription_browse,
|
||||||
handle_subscription_pick, _sync_subscription,
|
handle_subscription_pick, _sync_subscription,
|
||||||
handle_subscription_sync, handle_subscription_autosync,
|
handle_subscription_sync, handle_subscription_autosync,
|
||||||
handle_subscription_forum,
|
|
||||||
handle_subscription_delete, handle_subscription_syncall,
|
handle_subscription_delete, handle_subscription_syncall,
|
||||||
_sync_threads,
|
_sync_threads,
|
||||||
)
|
)
|
||||||
|
|
@ -151,9 +150,6 @@ def _dispatch_inner(data):
|
||||||
elif path.startswith("/subscriptions/autosync/"):
|
elif path.startswith("/subscriptions/autosync/"):
|
||||||
sid = extract_id("/subscriptions/autosync/")
|
sid = extract_id("/subscriptions/autosync/")
|
||||||
return handle_subscription_autosync(sid) if sid is not None else _error(400)
|
return handle_subscription_autosync(sid) if sid is not None else _error(400)
|
||||||
elif path.startswith("/subscriptions/forum/"):
|
|
||||||
sid = extract_id("/subscriptions/forum/")
|
|
||||||
return handle_subscription_forum(sid) if sid is not None else _error(400)
|
|
||||||
elif path.startswith("/subscriptions/delete/"):
|
elif path.startswith("/subscriptions/delete/"):
|
||||||
sid = extract_id("/subscriptions/delete/")
|
sid = extract_id("/subscriptions/delete/")
|
||||||
return handle_subscription_delete(sid) if sid is not None else _error(400)
|
return handle_subscription_delete(sid) if sid is not None else _error(400)
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,6 @@ def handle_subscriptions(msg=""):
|
||||||
for s in subs:
|
for s in subs:
|
||||||
sub_id = s["id"]
|
sub_id = s["id"]
|
||||||
auto_label = "on" if s["auto_sync"] else "off"
|
auto_label = "on" if s["auto_sync"] else "off"
|
||||||
forum_label = "on" if s["forum_enabled"] else "off"
|
|
||||||
last = s["last_sync"] or "never"
|
last = s["last_sync"] or "never"
|
||||||
sync_status = get_setting(f"sync_status_{sub_id}", "")
|
sync_status = get_setting(f"sync_status_{sub_id}", "")
|
||||||
is_syncing = sub_id in _sync_threads and _sync_threads[sub_id].is_alive()
|
is_syncing = sub_id in _sync_threads and _sync_threads[sub_id].is_alive()
|
||||||
|
|
@ -178,8 +177,6 @@ def handle_subscriptions(msg=""):
|
||||||
f'{sync_btn}'
|
f'{sync_btn}'
|
||||||
f'<form method="post" action="/subscriptions/autosync/{sub_id}" style="display:inline-block;margin:0">'
|
f'<form method="post" action="/subscriptions/autosync/{sub_id}" style="display:inline-block;margin:0">'
|
||||||
f'{_csrf_field()}<button>auto-sync: {auto_label}</button></form>'
|
f'{_csrf_field()}<button>auto-sync: {auto_label}</button></form>'
|
||||||
f'<form method="post" action="/subscriptions/forum/{sub_id}" style="display:inline-block;margin:0">'
|
|
||||||
f'{_csrf_field()}<button>forum: {forum_label}</button></form>'
|
|
||||||
f'<form method="post" action="/subscriptions/delete/{sub_id}" style="display:inline-block;margin:0">'
|
f'<form method="post" action="/subscriptions/delete/{sub_id}" style="display:inline-block;margin:0">'
|
||||||
f'{_csrf_field()}<button>remove</button></form>'
|
f'{_csrf_field()}<button>remove</button></form>'
|
||||||
f'</div>'
|
f'</div>'
|
||||||
|
|
@ -433,16 +430,6 @@ def handle_subscription_autosync(sub_id):
|
||||||
return _redirect("/subscriptions")
|
return _redirect("/subscriptions")
|
||||||
|
|
||||||
|
|
||||||
def handle_subscription_forum(sub_id):
|
|
||||||
db = get_db()
|
|
||||||
try:
|
|
||||||
db.execute("UPDATE subscriptions SET forum_enabled = 1 - forum_enabled WHERE id = ?", (sub_id,))
|
|
||||||
db.commit()
|
|
||||||
finally:
|
|
||||||
return_db(db)
|
|
||||||
return _redirect("/subscriptions")
|
|
||||||
|
|
||||||
|
|
||||||
def handle_subscription_delete(sub_id):
|
def handle_subscription_delete(sub_id):
|
||||||
db = get_db()
|
db = get_db()
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue