#687 Add an option to set main page after logging in
This commit is contained in:
@@ -15,7 +15,7 @@ sub request_is_api {
|
|||||||
|
|
||||||
hook 'before' => sub {
|
hook 'before' => sub {
|
||||||
params->{return_url} ||= ((request->path ne uri_for('/')->path)
|
params->{return_url} ||= ((request->path ne uri_for('/')->path)
|
||||||
? request->uri : uri_for('/inventory')->path);
|
? request->uri : uri_for(setting('web_home'))->path);
|
||||||
|
|
||||||
# from the internals of Dancer::Plugin::Auth::Extensible
|
# from the internals of Dancer::Plugin::Auth::Extensible
|
||||||
my $provider = Dancer::Plugin::Auth::Extensible::auth_provider('users');
|
my $provider = Dancer::Plugin::Auth::Extensible::auth_provider('users');
|
||||||
@@ -191,7 +191,7 @@ get '/logout' => sub {
|
|||||||
return to_json {};
|
return to_json {};
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect uri_for('/inventory')->path;
|
redirect uri_for(setting('web_home'))->path;
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ api_token_lifetime: 3600
|
|||||||
# debug: 3
|
# debug: 3
|
||||||
# tls_opts: {}
|
# tls_opts: {}
|
||||||
path: '/'
|
path: '/'
|
||||||
|
web_home: '/inventory'
|
||||||
web_plugins:
|
web_plugins:
|
||||||
- Inventory
|
- Inventory
|
||||||
- Report::PortVLANMismatch
|
- Report::PortVLANMismatch
|
||||||
|
|||||||
Reference in New Issue
Block a user