Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #821 (closed enhancement: wontfix)

Opened 13 years ago

Last modified 12 years ago

enable longer visit cookies than visit.timeout to be set

Reported by: andy@… Owned by: anonymous
Priority: normal Milestone:
Component: Identity Version: 0.9a5
Severity: normal Keywords:
Cc:

Description

I want to add a "remember me" checkbox on login that will set a visit cookie that doesn't expire for a long time. Say, 6 months. I was able to call _manager.update_visit() (and only felt a little dirty) but without the below change to update_visit(), the later date gets clobbered in the update queue before it can be written to the database.

Would this be acceptable? (basically adding the conditional that it only updates if greater than the current value in the queue dict)

visit/api.py BaseVisitManager?.update_visit():

def update_visit(self, visit_key, expiry):

try:

self.lock.acquire() # do not overwrite manual overrides to visit expiry if not self.queue.has_key(visit_key) or self.queue[visit_key] < expiry:

self.queue[visit_key]= expiry

finally:

self.lock.release()

Change History

comment:1 Changed 13 years ago by andy@…

wow, that got mis-formatted. Here are the 2 proposed new lines again.

# do not overwrite manual overrides to visit expiry
if not self.queue.has_key(visit_key) or self.queue[visit_key] < expiry:

comment:2 Changed 13 years ago by andy@…

  • Status changed from new to closed
  • Resolution set to wontfix

Jeff says there's a better way to do what I want, so closing this bug.

comment:3 Changed 13 years ago by jorge.vargas

can you please share?

Note: See TracTickets for help on using tickets.