mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 02:25:07 +00:00
feat: more review comments
This commit is contained in:
@@ -41,7 +41,7 @@ export const membershipIdentityDALFactory = (db: TDbClient) => {
|
||||
.leftJoin(TableName.Role, `${TableName.MembershipRole}.customRoleId`, `${TableName.Role}.id`)
|
||||
.leftJoin(TableName.IdentityMetadata, (queryBuilder) => {
|
||||
void queryBuilder
|
||||
.on(`${TableName.Membership}.actorIdentityId`, `${TableName.IdentityMetadata}.userId`)
|
||||
.on(`${TableName.Membership}.actorIdentityId`, `${TableName.IdentityMetadata}.identityId`)
|
||||
.andOn(`${TableName.Membership}.scopeOrgId`, `${TableName.IdentityMetadata}.orgId`);
|
||||
})
|
||||
.where(`${TableName.Membership}.scopeOrgId`, scopeData.orgId)
|
||||
|
||||
@@ -272,7 +272,7 @@ export const membershipIdentityServiceFactory = ({
|
||||
|
||||
if (existingMembership.actorIdentityId === dto.permission.id)
|
||||
throw new BadRequestError({
|
||||
message: "You can't delete you own membership"
|
||||
message: "You can't delete your own membership"
|
||||
});
|
||||
|
||||
const membershipDoc = await membershipIdentityDAL.transaction(async (tx) => {
|
||||
|
||||
@@ -41,7 +41,7 @@ export const newOrgMembershipIdentityFactory = ({
|
||||
const onCreateMembershipIdentityGuard: TMembershipIdentityScopeFactory["onCreateMembershipIdentityGuard"] =
|
||||
async () => {
|
||||
throw new BadRequestError({
|
||||
message: "Organizatin membership cannot be created for organization scoped identity"
|
||||
message: "Organization membership cannot be created for organization scoped identity"
|
||||
});
|
||||
};
|
||||
|
||||
@@ -88,7 +88,7 @@ export const newOrgMembershipIdentityFactory = ({
|
||||
const onDeleteMembershipIdentityGuard: TMembershipIdentityScopeFactory["onDeleteMembershipIdentityGuard"] =
|
||||
async () => {
|
||||
throw new BadRequestError({
|
||||
message: "Organizatin membership cannot be created for organization scoped identity"
|
||||
message: "Organization membership cannot be created for organization scoped identity"
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user