Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(auth): keep session reads and signed owners admitted under org rollout

Max7e4d486cd445
diff --git a/vibe/authorization.py b/vibe/authorization.py
index ab860da49..0ee91f776 100644
--- a/vibe/authorization.py
+++ b/vibe/authorization.py
@@ -590,7 +590,7 @@ _TEMPORARY_UNRESTRICTED_ORG_HTTP_RULES = tuple(
# Projects, sessions, chat execution, and ASR.
(_UNRESTRICTED_ORG_METHODS, r"^/api/projects(?:/[^/]+(?:/agents-md)?)?$"),
(_UNRESTRICTED_ORG_METHODS, r"^/api/workbench/projects-bootstrap$"),
- (_UNRESTRICTED_ORG_METHODS, r"^/api/sessions(?:/[^/]+(?:/(?:fork|bootstrap|archive-preview|messages|activity|cli-activity|cancel|mark-read|turn-state|queue(?:/[^/]+(?:/send-now)?)?|draft|attachments))?)?$"),
+ (_UNRESTRICTED_ORG_METHODS, r"^/api/sessions(?:/[^/]+(?:/(?:fork|cli-activity|cancel|mark-read|queue(?:/[^/]+(?:/send-now)?)?|draft|attachments))?)?$"),
(_UNRESTRICTED_ORG_METHODS, r"^/api/(?:search/messages|events|inbox)$"),
(_UNRESTRICTED_ORG_METHODS, r"^/api/asr/(?:transcribe|telemetry|status)$"),
# Apps: Dock, Files, browse favorites, Terminal teardown, and Show Pages.
diff --git a/vibe/ui_server.py b/vibe/ui_server.py
index 32ec84a43..11af1c1f0 100644
--- a/vibe/ui_server.py
+++ b/vibe/ui_server.py
@@ -2411,9 +2411,12 @@ def _has_temporary_runtime_access(context: Any) -> bool:
def _has_runtime_owner_access(context: Any) -> bool:
if context is None:
return False
- if context.is_remote and not _has_temporary_runtime_access(context):
- return False
- return bool(context.is_instance_owner or _has_temporary_runtime_access(context))
+ # A signed Instance owner (local or remote) owns its runtime surfaces, as in
+ # the established model; the temporary Organization rollout additionally
+ # admits active members. This never restricts a pre-existing owner.
+ if context.is_trusted_local or context.instance_role == "owner":
+ return True
+ return _has_temporary_runtime_access(context)
@app.before_request
@@ -2453,8 +2456,13 @@ def enforce_instance_role_capabilities():
try:
if context is None:
raise InstanceAuthorizationError(minimum_role)
+ # The temporary Organization rollout admits active members. Other remote
+ # principals on API runtime routes fail the active-Organization admission
+ # check here, before role rank; a signed Instance owner retains its
+ # origin/org admission to viewer/editor-allowed reads.
if (
context.is_remote
+ and context.instance_role != "owner"
and request.path.startswith("/api/")
and not has_temporary_unrestricted_org_access(context)
):