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
|
@ -11,7 +11,18 @@
|
|||
}
|
||||
}
|
||||
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.email = $scope.storage.data.email;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
* Login the user to verto server and
|
||||
* redirects him to dialpad page.
|
||||
*/
|
||||
$scope.login = function(redirect) {
|
||||
$rootScope.login = function(redirect, skipPreview = false) {
|
||||
if(redirect == undefined) {
|
||||
redirect = true;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@
|
|||
verto.testSpeed();
|
||||
}
|
||||
|
||||
if (redirect && storage.data.preview) {
|
||||
if (redirect && storage.data.preview && !skipPreview) {
|
||||
$location.path('/loading');
|
||||
} else if (redirect) {
|
||||
$location.path('/dialpad');
|
||||
|
|
Loading…
Reference in New Issue