From 1a5ee95ee4e7b739158bc7571b01b32b1af792ad Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Tue, 20 Jun 2017 10:37:51 +0300 Subject: Add a config.json option for enabling registration, don't link and redirect away from register page when it's disabled. --- src/components/registration/registration.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/components/registration/registration.js') diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index 9e99197c..771b3b27 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -4,6 +4,11 @@ const registration = { error: false, registering: false }), + created () { + if (!this.$store.state.config.registrationOpen || !!this.$store.state.users.currentUser) { + this.$router.push('/main/all') + } + }, computed: { termsofservice () { return this.$store.state.config.tos } }, -- cgit v1.2.3-70-g09d2