API 적용 최초 배포
Deploy feedback demo / deploy (push) Failing after 4m26s

This commit is contained in:
root
2026-09-01 17:12:46 +09:00
parent badf5f2c81
commit aaddfc7bfc
44 changed files with 1331 additions and 867 deletions
@@ -9,6 +9,7 @@ from app.db.models import (
UserWorkspaceAccess,
Workspace,
)
from app.core.config import settings
class AccessService:
@@ -36,19 +37,25 @@ class AccessService:
@staticmethod
def default_user_workspace_code(db: Session) -> str | None:
"""Return the first active ABC project workspace.
"""Return the configured public feedback workspace.
The old Q&A_Platform seed workspace must not determine the first SSO
redirect after ABC projects are synchronized.
Users without an explicit role assignment receive END_USER access to
this workspace. A configured code prevents old seed data or a newly
created project from changing the public writer target.
"""
return db.execute(
configured_code = settings.default_support_workspace_code.strip()
query = (
select(Workspace.workspace_code)
.where(
Workspace.is_active.is_(True),
Workspace.workspace_type == "SOFTWARE_APP",
)
.order_by(Workspace.id.asc()),
).scalar()
)
if configured_code:
query = query.where(Workspace.workspace_code == configured_code)
else:
query = query.order_by(Workspace.id.asc())
return db.execute(query).scalar()
@staticmethod
def _upsert_support_user(