mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
Chore: Making Account Signup Optional (#563)
Introduce new environment variable that lets you control account signups ENABLE_ACCOUNT_SIGNUP :( true | false | api_only ) Fixes: #406 Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
@@ -97,6 +97,14 @@ export const validateAuthenticateRoutePermission = (to, from, next) => {
|
||||
};
|
||||
|
||||
const validateRouteAccess = (to, from, next) => {
|
||||
if (
|
||||
window.chatwootConfig.signupEnabled !== 'true' &&
|
||||
to.meta &&
|
||||
to.meta.requireSignupEnabled
|
||||
) {
|
||||
next(frontendURL('dashboard'));
|
||||
}
|
||||
|
||||
if (authIgnoreRoutes.includes(to.name)) {
|
||||
return next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user