Fix: don't show register if new users not allowed (#3010)

* enforce allow new user flag on UI
* chore: bundle
* ensure we get a boolean

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Tiago Vasconcelos
2025-03-03 12:53:58 +01:00
committed by GitHub
co-authored by dni ⚡
parent c5964436b5
commit fe9b62e8a8
5 changed files with 30 additions and 9 deletions
+7 -3
View File
@@ -9,9 +9,7 @@ window.app = Vue.createApp({
description: ''
},
isUserAuthorized: false,
authAction: Quasar.LocalStorage.getItem('lnbits.disclaimerShown')
? 'login'
: 'register',
authAction: 'login',
authMethod: 'username-password',
usr: '',
username: '',
@@ -104,6 +102,12 @@ window.app = Vue.createApp({
},
created() {
this.description = SITE_DESCRIPTION
this.allowedRegister = ALLOWED_REGISTER
this.authAction =
!this.allowedRegister ||
Quasar.LocalStorage.getItem('lnbits.disclaimerShown')
? 'login'
: 'register'
this.isUserAuthorized = !!this.$q.cookies.get('is_lnbits_user_authorized')
const _acccess_cookies_for_safari_refresh_do_not_delete = document.cookie
if (this.isUserAuthorized) {