mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-11 17:50:39 +01:00
11 lines
315 B
JavaScript
Vendored
11 lines
315 B
JavaScript
Vendored
/**
|
|
* Prevent the Register view to be reachable when registration is disabled
|
|
*/
|
|
export default async function noRegistration({ to, next, nextMiddleware, stores }) {
|
|
const { appSettings } = stores
|
|
|
|
if (appSettings.disableRegistration) {
|
|
next({ name: 'notFound' })
|
|
}
|
|
else nextMiddleware()
|
|
} |