🛂 feat: Added Security for Conversation Access (#3588)

* 🛂 feat: Added Security for Conversation Access

* refactor: Update concurrentLimiter and convoAccess middleware to use isEnabled function for Redis check

* refactor: handle access check even if cache is not available (edge case)
This commit is contained in:
Danny Avila 2024-08-08 12:14:00 -04:00 committed by GitHub
parent b3821c1404
commit 5c99d93744
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 121 additions and 18 deletions

View file

@ -679,6 +679,7 @@ export enum InfiniteCollections {
* Enum for time intervals
*/
export enum Time {
ONE_HOUR = 3600000,
THIRTY_MINUTES = 1800000,
TEN_MINUTES = 600000,
FIVE_MINUTES = 300000,
@ -799,6 +800,10 @@ export enum ViolationTypes {
* Verify Email Limit Violation.
*/
VERIFY_EMAIL_LIMIT = 'verify_email_limit',
/**
* Verify Conversation Access violation.
*/
CONVO_ACCESS = 'convo_access',
}
/**