dataflake.org

Home Documentation Software Old Stuff

Last Access time doesn't get updated (Resolved)

Request LDAP User Folder -- bug report -- by Stefan Loidl
Posted on Jul 23, 2008 3:50 am
Subscribe

Enter your email address to receive mail on every change to this issue.

Entries (Latest first)


  Resolve by Jens Vagelpohl on Jul 23, 2008 5:38 am
  Looking closer at the (undocumented) getLastActiveTime and getCreationTime calls on the user object and how they were used it's become obvious there was some confusion.

The API to update the active time was never used, that's correct. And it is useless, anyway, because the last active time has nothing to do with the cache. The cache will expire the user based on the user creation time, not the last activity.

I have solved the confusion in a different way:

- got rid of the last active time API, it's confusing and useless

- switched the Caches tab in the ZMI to using the getCreationTime method, which is relevant for caching.

http://svn.dataflake.org/viewvc?view=rev&revision=1583

 

  Initial Request by Stefan Loidl on Jul 23, 2008 3:50 am
  The 'Last Access time' column in the Caches tab never gets updated.

I think this is because _updateActiveTime in LDAPUser.py is called nowhere.

I added the line:

user._updateActiveTime()

in def authenticate at line 795 of LDAPUserFolder.py. That works in my test environment.

I also patched dtml/cache.dtml so that now the creation and last access times are displayed.

98a99
> <td class="form-label"> Creation time </td>
125a127,130
> <dtml-var expr="getCreationTime()" fmt=Time>
> </td>
>
> <td valign="top" class="form-text">
158a164,167
> <dtml-var expr="getCreationTime()" fmt=Time>
> </td>
>
> <td valign="top" class="form-text">