mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
Merge pull request #1644 in FS/freeswitch from ~NETOGUIMARAES/freeswitch:feat/auto_login to master
* commit '85cfd5b5ab1b4f183b23a5de627b5e3588f373f7': FS-11584: [verto_communicator] make user able to login using url params
This commit is contained in:
commit
ead79413fa
html5/verto/verto_communicator/src/vertoControllers/controllers
@ -12,6 +12,17 @@
|
|||||||
}
|
}
|
||||||
preRoute();
|
preRoute();
|
||||||
|
|
||||||
|
var name = $location.search().name;
|
||||||
|
var email = $location.search().email;
|
||||||
|
var skipPreview = $location.search().skipPreview;
|
||||||
|
|
||||||
|
if (name && email) {
|
||||||
|
verto.data.name = name;
|
||||||
|
verto.data.email = email;
|
||||||
|
$scope.login(true, skipPreview);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
verto.data.name = $scope.storage.data.name;
|
verto.data.name = $scope.storage.data.name;
|
||||||
verto.data.email = $scope.storage.data.email;
|
verto.data.email = $scope.storage.data.email;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
* Login the user to verto server and
|
* Login the user to verto server and
|
||||||
* redirects him to dialpad page.
|
* redirects him to dialpad page.
|
||||||
*/
|
*/
|
||||||
$scope.login = function(redirect) {
|
$rootScope.login = function(redirect, skipPreview = false) {
|
||||||
if(redirect == undefined) {
|
if(redirect == undefined) {
|
||||||
redirect = true;
|
redirect = true;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@
|
|||||||
verto.testSpeed();
|
verto.testSpeed();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (redirect && storage.data.preview) {
|
if (redirect && storage.data.preview && !skipPreview) {
|
||||||
$location.path('/loading');
|
$location.path('/loading');
|
||||||
} else if (redirect) {
|
} else if (redirect) {
|
||||||
$location.path('/dialpad');
|
$location.path('/dialpad');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user