You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Slack integration for public links fails with an AttributeError. The slack.py router calls db.get_user_agent_access_level() which doesn't exist on the DatabaseManager class. This prevents users from connecting public agent links to Slack channels.
Component
Backend / Slack Router
Priority
P1
Error
AttributeError: 'DatabaseManager' object has no attribute 'get_user_agent_access_level'
Full traceback:
File "/app/routers/slack.py", line 425, in get_slack_connection_status
access = db.get_user_agent_access_level(current_user.id, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DatabaseManager' object has no attribute 'get_user_agent_access_level'
Location
File: backend/routers/slack.py
Lines: 425, 461, 497, 525
Functions: get_slack_connection_status, initiate_slack_oauth, and 2 others
Root Cause
The Slack router references a method get_user_agent_access_level() that was never implemented in the DatabaseManager class. This appears to be incomplete code - the Slack feature was added but the required database method wasn't created.
Reproduction Steps
Deploy Trinity with Slack credentials configured
Create a public link for an agent
Attempt to connect the public link to Slack via the UI
Check backend logs - observe AttributeError
Suggested Fix
Either:
Implement the missing method in database.py / db_manager.py:
This aligns with how all other routers (agents, schedules, subscriptions, etc.) handle agent access control. No new methods were needed - the existing can_user_access_agent and can_user_share_agent methods already provide the necessary functionality.
Activity
vybe commentedon Mar 1, 2026
Fixed in commit. Replaced non-existent
db.get_user_agent_access_level()calls with existing codebase patterns:db.can_user_access_agent(current_user.username, name)db.can_user_share_agent(current_user.username, name)This aligns with how all other routers (agents, schedules, subscriptions, etc.) handle agent access control. No new methods were needed - the existing
can_user_access_agentandcan_user_share_agentmethods already provide the necessary functionality.fix: Slack integration access checks use standard methods (Issue #48)