Add setting to redirect logged in users to dashboard
This commit is contained in:
parent
aeae72c01c
commit
7117099993
@ -16,7 +16,7 @@ class Home extends Controller {
|
|||||||
*/
|
*/
|
||||||
async welcome(req, res){
|
async welcome(req, res){
|
||||||
const Setting = this.models.get('Setting')
|
const Setting = this.models.get('Setting')
|
||||||
if ( await Setting.get('home.allow_landing') ) {
|
if ( await Setting.get('home.allow_landing') && !(req.user && await Setting.get('home.redirect_authenticated')) ) {
|
||||||
return res.page('welcome', {
|
return res.page('welcome', {
|
||||||
user: req.user,
|
user: req.user,
|
||||||
...this.Vue.data(),
|
...this.Vue.data(),
|
||||||
|
@ -3,6 +3,7 @@ const setting_config = {
|
|||||||
'auth.allow_registration': true,
|
'auth.allow_registration': true,
|
||||||
'auth.default_roles': [ 'base_user' ],
|
'auth.default_roles': [ 'base_user' ],
|
||||||
'home.allow_landing': true,
|
'home.allow_landing': true,
|
||||||
|
'home.redirect_authenticated': true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user