[open-ils-commits] r17729 - branches/rel_2_0/Open-ILS/web/js/dojo/openils (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 16 10:32:49 EDT 2010
Author: miker
Date: 2010-09-16 10:32:47 -0400 (Thu, 16 Sep 2010)
New Revision: 17729
Modified:
branches/rel_2_0/Open-ILS/web/js/dojo/openils/User.js
Log:
no need to ignore this improvement, which makes browser-focused dev simpler
Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/User.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/User.js 2010-09-16 14:31:17 UTC (rev 17728)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/User.js 2010-09-16 14:32:47 UTC (rev 17729)
@@ -24,6 +24,7 @@
dojo.require('fieldmapper.Fieldmapper');
dojo.require('fieldmapper.OrgUtils');
dojo.require('openils.Util');
+ dojo.require('dojo.cookie');
dojo.requireLocalization("openils.User", "User");
dojo.declare('openils.User', null, {
@@ -51,6 +52,7 @@
this.authcookie = kwargs.authcookie || openils.User.authcookie;
this.permOrgStoreCache = {}; /* permName => permOrgUnitStore map */
+ if (this.authcookie) this.authtoken = dojo.cookie(this.authcookie);
if (this.id && this.authtoken) this.user = this.getById( this.id );
else if (this.authtoken) this.getBySession();
else if (kwargs.login) this.login();
@@ -148,7 +150,6 @@
if (!openils.User.authtime) openils.User.authtime = _u.authtime;
_u.getBySession(onComplete);
if(_u.authcookie) {
- dojo.require('dojo.cookie');
dojo.cookie(_u.authcookie, _u.authtoken, {path:'/'});
}
}
@@ -192,7 +193,6 @@
if (!openils.User.authtime) openils.User.authtime = _u.authtime;
if(_u.authcookie) {
- dojo.require('dojo.cookie');
dojo.cookie(_u.authcookie, _u.authtoken, {path:'/'});
}
More information about the open-ils-commits
mailing list