Ticket #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: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Tim Dumol |
| Authors: | William Stein | Merged in: | |
| Dependencies: | Stopgaps: |
Description
Attachments
Change History
comment:1 Changed 5 years ago by TimothyClemans
- Owner changed from boothby to TimothyClemans
- Status changed from new to assigned
comment:2 Changed 5 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: ↓ 4 Changed 5 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 5 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 5 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 5 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')
comment:7 Changed 5 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 4 years ago by was
-
attachment
sagenb-3619.patch
added
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 4 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 4 years ago by timdumol
- Status changed from needs_review to positive_review
- Reviewers set to Tim Dumol
- Report Upstream set to N/A
- Authors set to William Stein
Applied and the patch works perfectly. I wonder though whether a configuration setting should be added?
comment:10 Changed 4 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 4 years ago by was
- Status changed from positive_review to closed
- Resolution set to fixed
comment:12 Changed 3 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
