fix: Home redirects local accounts to /local-workspace + sidebar Workspace section
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- Dashboard '/' checks user_oauth_tokens for Gitea connection
- Local accounts (no Gitea token) redirect to /local-workspace
- Sidebar: Workspace section above Meetings with 'My Workspace' link
- Local users no longer see Gitea projects on Home page
This commit is contained in:
2026-07-10 16:31:23 -04:00
parent 3417506062
commit 9542353b55
2 changed files with 34 additions and 0 deletions
+14
View File
@@ -304,6 +304,20 @@ async def dashboard(
auth = _get_user_or_redirect(request)
if isinstance(auth, RedirectResponse):
return auth
# Check if user has Gitea connected — if not, show local workspace
user_id = auth.get("id") if isinstance(auth, dict) else 1
has_gitea = False
try:
with get_conn() as conn:
tok = conn.execute(
"SELECT access_token FROM user_oauth_tokens WHERE user_id=? AND provider='gitea'",
(user_id,),
).fetchone()
has_gitea = bool(tok)
except Exception:
pass
if not has_gitea:
return RedirectResponse("/local-workspace", status_code=302)
try:
repos = await gitea.get_user_repos(page=1, limit=50)
if search: