mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #266 from gradido/259-disable-register-flag
turn registration on and off
This commit is contained in:
commit
42368ca546
@ -1,2 +1,3 @@
|
|||||||
LOGIN_API_URL=http://localhost/login_api/
|
LOGIN_API_URL=http://localhost/login_api/
|
||||||
COMMUNITY_API_URL=http://localhost/api/
|
COMMUNITY_API_URL=http://localhost/api/
|
||||||
|
ALLOW_REGISTER=true
|
||||||
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
// Load Package Details for some default values
|
// Load Package Details for some default values
|
||||||
// const pkg = require('../../package')
|
// const pkg = require('../../package')
|
||||||
|
|
||||||
const environment = {
|
const environment = {
|
||||||
NODE_ENV: process.env.NODE_ENV,
|
NODE_ENV: process.env.NODE_ENV,
|
||||||
DEBUG: process.env.NODE_ENV !== 'production' || false,
|
DEBUG: process.env.NODE_ENV !== 'production' || false,
|
||||||
PRODUCTION: process.env.NODE_ENV === 'production' || false,
|
PRODUCTION: process.env.NODE_ENV === 'production' || false,
|
||||||
|
ALLOW_REGISTER: process.env.ALLOW_REGISTER !== 'false',
|
||||||
}
|
}
|
||||||
|
|
||||||
const server = {
|
const server = {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import routes from './routes'
|
import routes from './routes'
|
||||||
|
import CONFIG from '../config'
|
||||||
|
|
||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
@ -21,4 +22,11 @@ const router = new VueRouter({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (CONFIG.ALLOW_REGISTER) {
|
||||||
|
router.addRoute({
|
||||||
|
path: '/register',
|
||||||
|
component: () => import('../views/Pages/Register.vue'),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@ -50,10 +50,6 @@ const routes = [
|
|||||||
path: '/thx',
|
path: '/thx',
|
||||||
component: () => import('../views/Pages/thx.vue'),
|
component: () => import('../views/Pages/thx.vue'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/register',
|
|
||||||
component: () => import('../views/Pages/Register.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/password',
|
path: '/password',
|
||||||
component: () => import('../views/Pages/ForgotPassword.vue'),
|
component: () => import('../views/Pages/ForgotPassword.vue'),
|
||||||
|
|||||||
@ -82,7 +82,7 @@
|
|||||||
{{ $t('site.login.forgot_pwd') }}
|
{{ $t('site.login.forgot_pwd') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="6" class="text-right">
|
<b-col cols="6" class="text-right" v-show="allowRegister">
|
||||||
<router-link to="/register">
|
<router-link to="/register">
|
||||||
{{ $t('site.login.new_wallet') }}
|
{{ $t('site.login.new_wallet') }}
|
||||||
</router-link>
|
</router-link>
|
||||||
@ -95,6 +95,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import loginAPI from '../../apis/loginAPI'
|
import loginAPI from '../../apis/loginAPI'
|
||||||
|
import CONFIG from '../../config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'login',
|
name: 'login',
|
||||||
@ -106,6 +107,7 @@ export default {
|
|||||||
// rememberMe: false
|
// rememberMe: false
|
||||||
},
|
},
|
||||||
loginfail: false,
|
loginfail: false,
|
||||||
|
allowRegister: CONFIG.ALLOW_REGISTER,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user