mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
feat: minor bug fix on access operation
This commit is contained in:
@@ -61,14 +61,14 @@ export const registerOrgAdminRouter = async (server: FastifyZodProvider) => {
|
||||
},
|
||||
onRequest: verifyAuth([AuthMode.JWT]),
|
||||
handler: async (req) => {
|
||||
const { membership, isExistingMember } = await server.services.orgAdmin.accessProject({
|
||||
const { membership } = await server.services.orgAdmin.accessProject({
|
||||
actorOrgId: req.permission.orgId,
|
||||
actorAuthMethod: req.permission.authMethod,
|
||||
actorId: req.permission.id,
|
||||
actor: req.permission.type,
|
||||
projectId: req.params.projectId
|
||||
});
|
||||
if (!isExistingMember && req.auth.authMode === AuthMode.JWT) {
|
||||
if (req.auth.authMode === AuthMode.JWT) {
|
||||
await server.services.auditLog.createAuditLog({
|
||||
...req.auditLogInfo,
|
||||
projectId: req.params.projectId,
|
||||
|
||||
@@ -169,7 +169,7 @@ export const orgAdminServiceFactory = ({
|
||||
},
|
||||
tx
|
||||
);
|
||||
return projectMembership;
|
||||
return newProjectMembership;
|
||||
});
|
||||
return { isExistingMember: false, membership: updatedMembership };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user