eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject [1/2] incubator-eagle git commit: session keep url
Date Thu, 03 Dec 2015 03:20:16 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 369093cd7 -> f2fa44d7b


session keep url


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/b7f23722
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/b7f23722
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/b7f23722

Branch: refs/heads/master
Commit: b7f23722235ce37585faec2c959b86f5197e3ba5
Parents: f9d688f
Author: jiljiang <jiljiang@ebay.com>
Authored: Fri Nov 27 02:53:55 2015 +0000
Committer: jiljiang <jiljiang@ebay.com>
Committed: Fri Nov 27 02:53:55 2015 +0000

----------------------------------------------------------------------
 eagle-webservice/src/main/webapp/app/public/js/app.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/b7f23722/eagle-webservice/src/main/webapp/app/public/js/app.js
----------------------------------------------------------------------
diff --git a/eagle-webservice/src/main/webapp/app/public/js/app.js b/eagle-webservice/src/main/webapp/app/public/js/app.js
index c8654f3..3ed3480 100644
--- a/eagle-webservice/src/main/webapp/app/public/js/app.js
+++ b/eagle-webservice/src/main/webapp/app/public/js/app.js
@@ -285,6 +285,11 @@ eagleApp.service('Authorization', function($http, $location, $cookies)
{
 
 	var content = {
 		isLogin: true,	// Status mark. Work for UI status check, changed when eagle api return
403 authorization failure.
+		needLogin: function() {
+			_path = _path || $location.path();
+			content.isLogin = false;
+			$location.path("/dam/login");
+		},
 		login: function(username, password) {
 			var _hash = btoa(username + ':' + password);
 			return $http({
@@ -350,7 +355,7 @@ eagleApp.service('Authorization', function($http, $location, $cookies)
{
 	return content;
 });
 
-eagleApp.service('Entities', function($http, $q, $rootScope, $location, Authorization) {
+eagleApp.service('Entities', function($http, $q, $rootScope, Authorization) {
 	// Query
 	function _query(name, kvs) {
 		kvs = kvs || {};
@@ -422,8 +427,7 @@ eagleApp.service('Entities', function($http, $q, $rootScope, $location,
Authoriz
 
 		_list._promise.then(function() {}, function(data) {
 			if(data.status === 403) {
-				Authorization.isLogin = false;
-				$location.path("/dam/login");
+				Authorization.needLogin();
 			}
 		});
 


Mime
View raw message