mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Made the roles the only lists of topics, Refused PRAGMAs in queries
- Removed `[server] topics` and `[replication] replicated_topics`: a push is taken by its roles' `push_topics`, a replicated message by the peer's `accept_topics`; a topic exists from its first message. - Topics that only came from a peer are read and listed like any other; `ListNames` lists the topics with messages, filtered by the roles. - A push to a topic no role names is `NotAllowed`; `UnknownName` is only for nodes. - Clients' queries: every PRAGMA refused as it's prepared (SQLite's authorizer), `PRAGMA query_only = 0` used to take effect. - Noted the leads found by reading the code in `docs/known-issues.md`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,7 @@ class ErrorCode(enum.IntEnum):
|
||||
NONE = 0
|
||||
# Refused by the server, the connection still open.
|
||||
NOT_ALLOWED = 1 # its roles don't allow it (or none is the server's, when connecting)
|
||||
UNKNOWN_NAME = 2 # a topic or node this server doesn't know
|
||||
UNKNOWN_NAME = 2 # a node this server has no message of
|
||||
NOT_FOUND = 3 # no such message or attachment
|
||||
NOT_READY = 4 # the attachment isn't on this server yet: retry later
|
||||
TOO_BIG = 5 # over a limit, or more than this server keeps
|
||||
@@ -542,7 +542,7 @@ class Client:
|
||||
time.sleep(interval)
|
||||
|
||||
def list_topics(self) -> NamesList:
|
||||
"""The topics the client may push to or read (every one if it may query)."""
|
||||
"""The topics with messages that the client may push to or read (every one if it may query)."""
|
||||
return self._list(self._dll.ListTopics, "List topics")
|
||||
|
||||
def list_nodes(self) -> NamesList:
|
||||
|
||||
Reference in New Issue
Block a user