Bert Leunis pushed to branch release/5.0 at cms-community / 
hippo-addon-channel-manager


Commits:
36d17f85 by Mathijs den Burger at 2018-01-08T16:32:26+01:00
CHANNELMGR-1658 Backport: Report page loads as user activity

Otherwise active logout will kick out users that are just browsing pages
in the Channel Manager (e.g. to preview content).

(cherry picked from commit 6c316fd9502e75a61bc34afc585882d99af4887d)

- - - - -
d5a8241f by Bert Leunis at 2018-01-09T09:23:35+01:00
CHANNELMGR-1658 Reintegrate bugfix/CHANNELMGR-1658

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.js
- frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.spec.js


Changes:

=====================================
frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.js
=====================================
--- a/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.js
+++ b/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2016-2018 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
  */
 
 class HippoIframeService {
-
   constructor(
     $log,
     $q,
@@ -109,6 +108,8 @@ class HippoIframeService {
       delete this.deferredReload;
       deferred.resolve();
     }
+
+    this.CmsService.publish('user-activity');
   }
 
   _determineRenderPathInfo() {


=====================================
frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.spec.js
=====================================
--- a/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.spec.js
+++ b/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.service.spec.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2016-2018 Hippo B.V. (http://www.onehippo.com)
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -129,6 +129,12 @@ describe('HippoIframeService', () => {
     $rootScope.$digest();
   });
 
+  it('reports page loads as user activity', () => {
+    spyOn($window.APP_TO_CMS, 'publish');
+    HippoIframeService.signalPageLoadCompleted();
+    expect($window.APP_TO_CMS.publish).toHaveBeenCalledWith('user-activity');
+  });
+
   it('ignores page loads which are no reloads', () => {
     spyOn($log, 'warn');
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/158f2ee7bd2f20c6206bd909703956d3fb2b3860...d5a8241f33670ae800a89920603764a48faf0c66

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/158f2ee7bd2f20c6206bd909703956d3fb2b3860...d5a8241f33670ae800a89920603764a48faf0c66
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to