Appearance
Documentation / @kizami/db / index / listTenantPresetAssignmentRows
Function: listTenantPresetAssignmentRows()
listTenantPresetAssignmentRows(
db,tenantId):Promise<TenantPresetAssignmentRow[]>
Defined in: packages/db/src/queries/permissions.ts:105
テナント内の全プリセット割当を「ユーザー × プリセット」の生の行として返す。
listTenantPresetGrantsByUser との違いは presetId を保持する点。プリセット編集 (PATCH /presets/:id)の「最後の権限管理保持者」判定は、割当のうち編集対象のプリセットだけを 編集後の内容へ差し替えて実効権限を計算し直す必要があり、どの行が対象プリセットかを 識別できなければならない(内容の一致で判定すると同一内容の別プリセットを取り違える)。
Parameters
db
tenantId
string
Returns
Promise<TenantPresetAssignmentRow[]>