>_
.issue.db
/highway-workflow-engine
Dashboard
Issues
Memory
Lessons
Audit Log
New Issue
Edit Issue #530
Update issue details
Title *
Description
**File:** api/middleware/rbac.py:660-680 **Problem:** Permission check and role retrieval use separate database connections. Two connections for what could be one. **Fix:** Combine into single connection: ```python def _check_permission_with_roles() -> tuple[bool, list]: with db.get_db_connection() as conn: has_perm = check_user_permission(conn, tenant_id, user_email, permission) roles = get_user_roles(conn, tenant_id, user_email) if not has_perm else [] return has_perm, roles ``` **Impact:** 50% reduction in DB connections on permission errors.
Priority
Low
Medium
High
Critical
Status
Open
In Progress
Closed
Won't Do
Due Date (YYYY-MM-DD)
Tags (comma separated)
Related Issues (IDs)
Enter IDs of issues related to this one. They will be linked as 'related'.
Update Issue
Cancel