Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update --+ Reporter: rjollos | Owner: rjollos Type: defect | Status: accepted Priority: major| Milestone: Release 8 Component: plugins |Version: 0.5.3 Resolution: | Keywords: AccountManager --+ Changes (by rjollos): * milestone: Release 7 = Release 8 -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:19 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update --+ Reporter: rjollos | Owner: rjollos Type: defect | Status: accepted Priority: major| Milestone: Release 7 Component: plugins |Version: 0.5.3 Resolution: | Keywords: AccountManager --+ Changes (by rjollos): * priority: critical = major * milestone: Release 6 = Release 7 -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:18 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update ---+ Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: critical | Milestone: Release 6 Component: plugins |Version: 0.5.3 Resolution:| Keywords: AccountManager ---+ Comment (by astaric): I can confirm, that last_visit does not update after each login. However, both setups (bloodhound and trac) with the login options I tested (!AccountManager, --auth, --basic-auth) behave in the same way, last_visit time is only updated when - session is created for the first time (first login) - when session data is modified and sufficient amount of time has passed. Only the first loggin satisfies this requirements and (in every setup I have tried) creates a session record with last_visit filled in. The following logins do not automatically modify the last_visit field. My guess is that last_visit was not ment to be used as Last login time, but as a helper to decide, when the session data can be removed from the database. I based my observation on the comment just before the code that updates the last_visit time. {{{ # Purge expired sessions. We do this only when the session was # changed as to minimize the purging. }}} As long as the admin panel reads data from Session.last_visit, column caption Last Login is misleading. We could touch the session data after each successful login, which would keep this field (more) up to date, but the real solution would probably be to store logins in a separate table. If we consider this an important issue, we could propose a patch to !AccountManager or hack around to manually update the last_visit time. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:17 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update ---+ Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: critical | Milestone: Release 6 Component: plugins |Version: 0.5.3 Resolution:| Keywords: AccountManager ---+ Comment (by rjollos): What do you conclude so far? My feeling is that `last_visit` should update, at least within the specified 24 hour resolution. In Bloodhound, it does not seem to update even on first login when a new user is created. My observation was that `last_visit` is never updated on repeated login, and that seems to provide supporting evidence for what a user issue reported on the [http://markmail.org/message/mlywn6f3zned5duo mailing list]. So is the problem with !AccountManagerPlugin? Does Trac properly update `last_visit` if there hasn't been a login for 24 hours? -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:16 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update ---+ Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: critical | Milestone: Release 6 Component: plugins |Version: 0.5.3 Resolution:| Keywords: AccountManager ---+ Comment (by olemis): Replying to [comment:6 rjollos]: Replying to [comment:5 olemis]: You mean hooks executed at startup to load environment and request? Right. Since it works fine in Trac with !AccountManagerPlugin, and the issue is that the `last_visit` field of the `session` table isn't being updated, it appeared to me that the problem is associated with the modifications in `trac.web.main.dispatch_request`, or the `trac.hooks.default_bootstrap_handler` instance that it calls. I put more details about this in the [comment:description], but still need to do some more debugging to figure out what the exact problem is. I'll take a (quick) look into this later today . However in advance all I can say is that bootstrap handlers have nothing to do with database access. I'd rather focus on multi-product SQL translator. Notice that queries for plugin tables are translated in a very particular way. Indeed what are the SQL statements logged .your side. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:7 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update +--- Reporter: rjollos| Owner: nobody Type: defect | Status: new Priority: critical | Milestone: Release 6 Component: dashboard |Version: 0.5.3 Resolution: | Keywords: +--- Changes (by rjollos): * priority: major = critical * owner: = nobody * component: = dashboard * milestone: = Release 6 -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:1 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update +--- Reporter: rjollos| Owner: rjollos Type: defect | Status: accepted Priority: critical | Milestone: Release 6 Component: dashboard |Version: 0.5.3 Resolution: | Keywords: +--- Changes (by rjollos): * owner: nobody = rjollos * status: new = accepted Old description: The //Last Login// column in the Users table under Admin Accounts Users doesn't update correctly on login. Inspection of the database shows that the `last_visit` field isn't updating, though it does update correctly on login in the default Trac with !AccountManagerPlugin and HtPasswd authentication. More investigation is needed, but debugging so far has revealed that [http://trac.edgewall.org/browser/tags/trac-1.0.1/trac/web/session.py?marks=121#L98 Session._new] is `False` under conditions that it is `True` in the default setup, resulting in `Session._last_visit` not getting updated. It looks like the problem is somewhere in the `trac.web.main`, `trac.hooks` or `trac.web.session` modules, all of which are involved in request handling and dispatching, and where modifications have been made for multi-product support. New description: The //Last Login// column in the Users table under Admin Accounts Users doesn't update correctly on login. Inspection of the database shows that the `last_visit` field isn't updating, though it does update correctly on login in the default Trac with !AccountManagerPlugin and !HtPasswd authentication. More investigation is needed, but debugging so far has revealed that [http://trac.edgewall.org/browser/tags/trac-1.0.1/trac/web/session.py?marks=121#L98 Session._new] is `False` under conditions that it is `True` in the default setup, resulting in `Session._last_visit` not getting updated. It looks like the problem is somewhere in the `trac.web.main`, `trac.hooks` or `trac.web.session` modules, all of which are involved in request handling and dispatching, and where modifications have been made for multi-product support. -- -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:2 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #554: Last Login does not update
#554: Last Login does not update ---+ Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: critical | Milestone: Release 6 Component: plugins |Version: 0.5.3 Resolution:| Keywords: AccountManager ---+ Comment (by rjollos): I don't believe the issue is actually with !AccountManagerPlugin. The plugin is simply displaying `Sessions.last_visit` so the defect was noticed while viewing an !AccountManager admin panel, but the issue appears to be with the Bootstrap request handler. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/554#comment:4 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker