feat(tenants): host'tan kiracı kullanıcılarını görüntüleme + bürünme UI köprüsü - #36
Merged
Merged
Conversation
…UI köprüsü Backend'in zaten desteklediği cross-tenant impersonation'a eksik UI yüzeyi: - GET /api/users?tenantId= (yalnız host bağlamı; kiracı çağırana koşulsuz 403 — kendi id'si dahil, durum kodu yabancı id'yi ele vermesin diye) - UserService.listForTenant: iki aşamalı sayfalama (Q-03); aspect'in kurduğu hostFilter explicit predicate ile AND'lenip boş sayfa ürettiğinden sorgu bloğunda askıya alınır, finally geri kurar (TenantAdminBootstrapper deseni) - Kiracılar listesi: users.read korumalı "Kullanıcıları gör" + TenantUsersDialog; satır başına users.impersonate korumalı "Bürün" -> impersonate(userId, tenantId); pasif kullanıcıda ve cascade'de devre dışı; en/tr tenants.users.* - schema.d.ts yeniden üretildi (tenantId parametresi) Kanıt: HostTenantUserListingIT 3 IT (mutlu yol ilk koşumda filtre yüzünden kırmızıydı — test gerçeği ölçüyor; kiracıya çift 403 negatifi; parametresiz host listeleme pinli) yeşil; backend 234 unit yeşil; frontend build + 194 test yeşil (5 yeni: sorgu dizesi, impersonate(42,7), disable kuralları, izin negatifi). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ne
Host operatörünün bir kiracının kullanıcılarını görüp içlerinden birine bürünmesini sağlayan UI köprüsü. Backend cross-tenant impersonation'ı (
targetTenantId) zaten destekliyordu; eksik olan hedef kullanıcıyı seçecek yüzeydi.Nasıl
GET /api/users?tenantId=— yalnız host bağlamı. Kiracı çağıran hangi id'yi gönderirse göndersin (kendi id'si dahil) 403: boş sayfa "kullanıcı yok" diye okunurdu; kendi id'sine 200 verilseydi durum kodu yabancı id'yi ele verirdi.UserService.listForTenantaynı iki aşamalı sayfalamayı (Q-03) kullanır; aspect'in giriş anında kurduğuhostFilterexplicittenantIdpredicate'iyle AND'lenip boş sayfa ürettiği için sorgu bloğunda askıya alınıpfinally'de geri kurulur (TenantAdminBootstrapperdeseni; RLS tabanı yerinde).users.readkorumalı "Kullanıcıları gör" aksiyonu +TenantUsersDialog(arama, sayfalama, aktiflik rozeti). Satır başınausers.impersonatekorumalı "Bürün" →auth.impersonate(userId, tenantId); pasif kullanıcıda ve bürünme oturumu içindeyken (cascade aynası) devre dışı. en/trtenants.users.*;schema.d.tsyeniden üretildi.Kanıt
HostTenantUserListingIT3 IT yeşil — mutlu yol İLK koşumda hostFilter yüzünden kırmızıydı (negatif kanıt: test gerçeği ölçüyor); kiracı çağırana çift 403; parametresiz host listelemenin host satırlarında kaldığı pinli.clean verify).npm run build+ 194 test yeşil (5 yeni: cross-tenant sorgu dizesi,impersonate(42, 7), pasif/cascade disable, izinsizde düğme yokluğu).🤖 Generated with Claude Code