Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#3619 closed enhancement (fixed)

notebook -- record date & time each user logs in

Reported by: TimothyClemans Owned by: TimothyClemans
Priority: major Milestone: sage-4.3
Component: notebook Keywords:
Cc: Merged in:
Authors: William Stein Reviewers: Tim Dumol
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description


Attachments (2)

sage-3619.patch (4.5 KB) - added by TimothyClemans 13 years ago.
Depends on #3776
sagenb-3619.patch (5.0 KB) - added by was 12 years ago.
new patch against sagenb that simply adds calls to log.msg in a few places, which will properly log user login attempts using the standard twisted loging facility

Download all attachments as: .zip

Change History (14)

comment:1 Changed 13 years ago by TimothyClemans

  • Owner changed from boothby to TimothyClemans
  • Status changed from new to assigned

comment:2 Changed 13 years ago by TimothyClemans

  • Summary changed from notebook -- record date & time each user logs in to [with patch, needs review] notebook -- record date & time each user logs in

I couldn't seem to figure out how to get AdminToplevel? to be the toplevel for admins.

comment:3 follow-up: Changed 13 years ago by ncalexan

I don't understand what the final comment, about AdminToplevel?, is about.

I worry that we will hang on to thousands of login times with this, which could be memory/disk intensive. Could we agree on the last fifty login times, or the first time ever and then the next 100 or something similar?

Also, there is no way to view this information. Why are we keeping it?

comment:4 in reply to: ↑ 3 Changed 13 years ago by TimothyClemans

Replying to ncalexan:

I don't understand what the final comment, about AdminToplevel?, is about.

Somehow the user account type for the user admin was getting changed to 'user'. This is no longer a problem because a patch was merged which has account_type returning 'admin' for user admin no matter what.

I worry that we will hang on to thousands of login times with this, which could be memory/disk intensive. Could we agree on the last fifty login times, or the first time ever and then the next 100 or something similar?

We could, but I am very interested in being able to look up all login times for a given user.

Also, there is no way to view this information. Why are we keeping it?

There will be. I just didn't do it because at the time I couldn't figure out the AdminToplevel? problem.

I'll get back to this ticket after thinking more about it. Thanks for reviewing.

comment:5 Changed 13 years ago by TimothyClemans

  • Summary changed from [with patch, needs review] notebook -- record date & time each user logs in to [with patch, needs work] notebook -- record date & time each user logs in

comment:6 Changed 13 years ago by TimothyClemans

  • Summary changed from [with patch, needs work] notebook -- record date & time each user logs in to [with patch, needs review] notebook -- record date & time each user logs in

How I test this:

(1) I login and then go to sage.math.washington.edu:8999/users # Table of users with two links next to each of them if login recording is on.

(2) I click on "Access" in third column to see login times. The page should be blank if no login times have been recorded.

Login recording is turned off by default. In order to turn it on I do:

*** WARNING: Notebook must not be running! ***

sage: nb = load('.sage/sage_notebook/nb.sobj', compress=False)
sage: nb.conf()['record_logins'] = True
sage: nb.save(filename='/home/tclemans/.sage/sage_notebook/nb.sobj')

Changed 13 years ago by TimothyClemans

Depends on #3776

comment:7 Changed 13 years ago by TimothyClemans

  • Summary changed from [with patch, needs review] notebook -- record date & time each user logs in to [with patch, needs work] notebook -- record date & time each user logs in

Changed 12 years ago by was

new patch against sagenb that simply adds calls to log.msg in a few places, which will properly log user login attempts using the standard twisted loging facility

comment:8 Changed 12 years ago by was

  • Status changed from needs_work to needs_review
  • Summary changed from [with patch, needs work] notebook -- record date & time each user logs in to [with patch, needs review] notebook -- record date & time each user logs in

I've attached a new patch against sagenb that simply adds calls to log.msg in a few places, which will properly log user login attempts using the standard twisted loging facility. I also deleted some cruft from guard.py that wasn't used.

comment:9 Changed 12 years ago by timdumol

  • Authors set to William Stein
  • Report Upstream set to N/A
  • Reviewers set to Tim Dumol
  • Status changed from needs_review to positive_review

Applied and the patch works perfectly. I wonder though whether a configuration setting should be added?

comment:10 Changed 12 years ago by was

Applied and the patch works perfectly. I wonder though whether a configuration setting should be added?

Yes, definitely. However, I don't think that has to be done in this patch. Little steps are best.

comment:11 Changed 12 years ago by was

  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:12 Changed 12 years ago by mvngu

  • Summary changed from [with patch, needs review] notebook -- record date & time each user logs in to notebook -- record date & time each user logs in
Note: See TracTickets for help on using tickets.