mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 12:16:36 +00:00
scope user id check to idp in create idp user
This commit is contained in:
@@ -141,7 +141,12 @@ export async function createOrgUser(
|
|||||||
const [existingUser] = await trx
|
const [existingUser] = await trx
|
||||||
.select()
|
.select()
|
||||||
.from(users)
|
.from(users)
|
||||||
.where(eq(users.username, username));
|
.where(
|
||||||
|
and(
|
||||||
|
eq(users.username, username),
|
||||||
|
eq(users.idpId, idpId)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (existingUser) {
|
if (existingUser) {
|
||||||
const [existingOrgUser] = await trx
|
const [existingOrgUser] = await trx
|
||||||
|
|||||||
Reference in New Issue
Block a user