mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: addressed comments
This commit is contained in:
@@ -4,7 +4,7 @@ import { RelaysSchema } from "@app/db/schemas";
|
||||
import { getConfig } from "@app/lib/config/env";
|
||||
import { crypto } from "@app/lib/crypto/cryptography";
|
||||
import { UnauthorizedError } from "@app/lib/errors";
|
||||
import { writeLimit } from "@app/server/config/rateLimiter";
|
||||
import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
|
||||
import { slugSchema } from "@app/server/lib/schemas";
|
||||
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
|
||||
import { AuthMode } from "@app/services/auth/auth-type";
|
||||
@@ -107,6 +107,9 @@ export const registerRelayRouter = async (server: FastifyZodProvider) => {
|
||||
200: RelaysSchema.array()
|
||||
}
|
||||
},
|
||||
config: {
|
||||
rateLimit: readLimit
|
||||
},
|
||||
onRequest: verifyAuth([AuthMode.JWT, AuthMode.IDENTITY_ACCESS_TOKEN]),
|
||||
handler: async (req) => {
|
||||
return server.services.relay.getRelays({
|
||||
|
||||
@@ -1083,7 +1083,7 @@ export const relayServiceFactory = ({
|
||||
ForbiddenError.from(permission).throwUnlessCan(OrgPermissionRelayActions.DeleteRelays, OrgPermissionSubjects.Relay);
|
||||
|
||||
const relay = await relayDAL.findById(id);
|
||||
if (!relay || relay.orgId !== actorOrgId) {
|
||||
if (!relay || relay.orgId !== actorOrgId || relay.orgId === null) {
|
||||
throw new NotFoundError({ message: "Relay not found" });
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ export const OrgRelayPermissionRow = ({ isEditable, control, setValue }: Props)
|
||||
}
|
||||
field.onChange(e);
|
||||
}}
|
||||
id={`permissions.relays.${action}`}
|
||||
id={`permissions.relay.${action}`}
|
||||
>
|
||||
{label}
|
||||
</Checkbox>
|
||||
|
||||
Reference in New Issue
Block a user