From bfdfbab85f167b980e1fb81a48a8f605c5f5e746 Mon Sep 17 00:00:00 2001 From: chan Date: Tue, 16 Jun 2026 18:19:15 +0900 Subject: [PATCH] =?UTF-8?q?backend:=20=ED=85=8C=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=EC=A1=B0=ED=9A=8C=20API(GetTenant)=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=20=EA=B6=8C=ED=95=9C=20=EB=A7=B5=EC=97=90=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B2=84=EC=9B=8D=EC=8A=A4=20=EC=97=B0?= =?UTF-8?q?=EB=8F=99=20=EA=B6=8C=ED=95=9C(view/manage=5Fworksmobile)=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=20=EB=B0=8F=20=EB=B0=98=ED=99=98=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EA=B5=AC=ED=98=84=20=EC=99=84=EB=A3=8C=20(#1183)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/handler/tenant_handler.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/internal/handler/tenant_handler.go b/backend/internal/handler/tenant_handler.go index 729519a8..bdaa523c 100644 --- a/backend/internal/handler/tenant_handler.go +++ b/backend/internal/handler/tenant_handler.go @@ -97,6 +97,8 @@ type tenantPermissions struct { ManageOrganization bool `json:"manage_organization"` ViewSchema bool `json:"view_schema"` ManageSchema bool `json:"manage_schema"` + ViewWorksmobile bool `json:"view_worksmobile"` + ManageWorksmobile bool `json:"manage_worksmobile"` } type tenantSummary struct { @@ -1711,6 +1713,8 @@ func (h *TenantHandler) GetTenant(c *fiber.Ctx) error { ManageOrganization: true, ViewSchema: true, ManageSchema: true, + ViewWorksmobile: true, + ManageWorksmobile: true, } } else { // Query Keto in parallel for maximum performance @@ -1720,13 +1724,14 @@ func (h *TenantHandler) GetTenant(c *fiber.Ctx) error { allowed bool err error } - ch := make(chan checkResult, 11) + ch := make(chan checkResult, 13) relations := []string{ "view", "manage", "manage_admins", "view_profile", "manage_profile", "view_permissions", "manage_permissions", "view_organization", "manage_organization", "view_schema", "manage_schema", + "view_worksmobile", "manage_worksmobile", } for _, rel := range relations { go func(r string) { @@ -1765,6 +1770,10 @@ func (h *TenantHandler) GetTenant(c *fiber.Ctx) error { perms.ViewSchema = res.allowed case "manage_schema": perms.ManageSchema = res.allowed + case "view_worksmobile": + perms.ViewWorksmobile = res.allowed + case "manage_worksmobile": + perms.ManageWorksmobile = res.allowed } } summary.UserPermissions = perms