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(admin): add admin check for Feishu shared-card form submissions

cyhed3d28facd0a
diff --git a/modules/im/feishu.py b/modules/im/feishu.py
index 804d963e7..de999b01b 100644
--- a/modules/im/feishu.py
+++ b/modules/im/feishu.py
@@ -1254,6 +1254,16 @@ class FeishuBot(BaseIMClient):
# --- Form submissions (action_type: form_submit) ---
if form_value is not None:
+ # Admin-only form submissions: settings, CWD, routing
+ # Feishu cards are shared in the channel, so any member can
+ # submit them — enforce admin check here.
+ admin_forms = ("cwd_submit", "settings_submit", "routing_backend_select", "routing_submit")
+ if button_name in admin_forms and self.settings_manager:
+ store = self.settings_manager.store
+ if store.has_any_admin() and not store.is_admin(user_id):
+ logger.info("Permission denied: %s attempted form %s", user_id, button_name)
+ return
+
if button_name == "cwd_submit":
await self._handle_cwd_form_submit(context, form_value)
elif button_name == "settings_submit":