mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
Address Greptile review on board CLI auth
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
01b6b7e66a
commit
7f9a76411a
9 changed files with 207 additions and 54 deletions
|
|
@ -1671,8 +1671,12 @@ export function accessRoutes(
|
|||
);
|
||||
|
||||
if (approved.status === "approved") {
|
||||
const accessSnapshot = await boardAuth.resolveBoardAccess(userId);
|
||||
for (const companyId of accessSnapshot.companyIds) {
|
||||
const companyIds = await boardAuth.resolveBoardActivityCompanyIds({
|
||||
userId,
|
||||
requestedCompanyId: approved.challenge.requestedCompanyId,
|
||||
boardApiKeyId: approved.challenge.boardApiKeyId,
|
||||
});
|
||||
for (const companyId of companyIds) {
|
||||
await logActivity(db, {
|
||||
companyId,
|
||||
actorType: "user",
|
||||
|
|
@ -1737,8 +1741,11 @@ export function accessRoutes(
|
|||
req.actor.userId,
|
||||
);
|
||||
await boardAuth.revokeBoardApiKey(key.id);
|
||||
const accessSnapshot = await boardAuth.resolveBoardAccess(key.userId);
|
||||
for (const companyId of accessSnapshot.companyIds) {
|
||||
const companyIds = await boardAuth.resolveBoardActivityCompanyIds({
|
||||
userId: key.userId,
|
||||
boardApiKeyId: key.id,
|
||||
});
|
||||
for (const companyId of companyIds) {
|
||||
await logActivity(db, {
|
||||
companyId,
|
||||
actorType: "user",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue