Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notebook -- user management features #4135

Closed
TimothyClemans mannequin opened this issue Sep 16, 2008 · 38 comments
Closed

notebook -- user management features #4135

TimothyClemans mannequin opened this issue Sep 16, 2008 · 38 comments

Comments

@TimothyClemans
Copy link
Mannequin

TimothyClemans mannequin commented Sep 16, 2008

New features:

  • Reset a user's password
  • Add a new user
  • Suspend/unsuspend a user
  • Temporary password shown for each user if one is set (Created by password reset and add user)

Component: notebook

Author: Timothy Clemans

Reviewer: Tim Dumol, Dan Drake

Merged: Sage 4.1.2.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/4135

@TimothyClemans TimothyClemans mannequin added this to the sage-3.1.2 milestone Sep 16, 2008
@TimothyClemans TimothyClemans mannequin assigned boothby Sep 16, 2008
@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Sep 16, 2008

comment:1

Depends on #4134 and #2407

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.1.2, sage-3.1.3 Sep 16, 2008
@dandrake
Copy link
Contributor

comment:3

I'm trying to review this, but I can't get the patches to apply. I'm starting from a clean 3.1.2 tree. Which patches should I apply, and in what order? Should I use a different version to apply patches against?

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Sep 29, 2008

comment:4

This ticket has been rebased.

@jasongrout
Copy link
Member

comment:5

It seems that the /user page isn't found with an existing notebook. I created a new notebook and the /users page came up.

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Sep 29, 2008

comment:6

I've had trouble in the pass with getting administrative users recognized by the Notebook.

@dandrake
Copy link
Contributor

comment:7

I've applied all the necessary patches to a 3.1.3alpha1 tree, but when I try to start Sage, I get:

/var/tmp/sage-3.1.3.alpha1/local/lib/python2.5/site-packages/sage/server/notebook/twist.py in <module>()
   1935     return False
   1936 
-> 1937 from sage.server.notebook.template import registration_page_template
   1938 from sage.server.notebook.template import login_page_template
   1939 

/var/tmp/sage-3.1.3.alpha1/local/lib/python2.5/site-packages/sage/server/notebook/template.py in <module>()
     38 templates = ['login', 'yes_no', 'failed_login', 'register', 'admin_add_user']
     39 for name in templates:
---> 40     G[name + '_template'] =  PageTemplate(pjoin(path, '%s.template'%name))
     41 
     42 def login_page_template(accounts, default_user, is_username_error=False, is_password_error=False, welcome=None, recover=False):

/var/tmp/sage-3.1.3.alpha1/local/lib/python2.5/site-packages/sage/server/notebook/template.py in __init__(self, filename)
     27 class PageTemplate:
     28     def __init__(self, filename):
---> 29         file = open(filename, 'r')
     30         self.__template = Template(file.read())
     31         file.close()

IOError: [Errno 2] No such file or directory: '/var/tmp/sage-3.1.3.alpha1/data/extcode/notebook/templates/admin_add_user.template'

That's just the last part of the traceback; the rest doesn't seem so interesting...but let me know if you want to see it.

I've looked through the patches from 4134, 2407, and this ticket, and I don't see where the file admin_add_user.template is created. I have all those patches applied (except 4134, which has already been merged); how do I get that file?

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Sep 30, 2008

comment:8

Replying to @dandrake:

I've looked through the patches from 4134, 2407, and this ticket, and I don't see where the file admin_add_user.template is created. I have all those patches applied (except 4134, which has already been merged); how do I get that file?

Did you do hg_extcode.apply('https://github.com/sagemath/sage/files/ticket4135/extcode-4135_1.patch.gz')

@jasongrout
Copy link
Member

comment:9

Or if you're using queues and don't want to mess up your tree, go to $SAGE_ROOT/data/extcode and do:

hg qinit
hg qimport /path/to/extcode-patch
hg qpush

@mwhansen
Copy link
Contributor

comment:10

Timothy, what is the relationship between this patch and #3923, #3937, and #3949.

@TimothyClemans TimothyClemans mannequin added the s: needs work label Nov 9, 2008
@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Nov 11, 2008

comment:12

Apply just extcode-4135_1.patch and sage-4145_3.patch

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Nov 11, 2008

comment:14

Depends on #3950

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Nov 11, 2008

comment:15

Don't apply extcode-4135_1.patch afterall

@TimothyClemans
Copy link
Mannequin Author

TimothyClemans mannequin commented Dec 20, 2008

comment:16

Apply sage-4135_3.patch and sage-4135_4.patch

@mwhansen
Copy link
Contributor

Attachment: trac_4135.patch.gz

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 24, 2009

comment:23

Hmm, given this is rather crucial and hard to test code I would be happy if someone else did take another look, so "needs review" to attract someone else.

Cheers,

Michael

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Jul 27, 2009

comment:24

Applied patch to r12658.

Everything works perfectly except for the cancel link in the Account Settings page. It links to /home, leading to a 404 Error. I believe /home// is the proper way to link it.

@TimDumol TimDumol mannequin added s: needs work and removed s: needs review labels Jul 27, 2009
@dandrake
Copy link
Contributor

comment:25

Replying to @TimDumol:

Applied patch to r12658.

Everything works perfectly except for the cancel link in the Account Settings page. It links to /home, leading to a 404 Error. I believe /home// is the proper way to link it.

I see the same error. I put in a <pre>{{ debug()|e }}</pre> bit (see http://jinja.pocoo.org/1/documentation/designerdoc) into account_settings.html and it looks like the template engine is not getting a username.

@wjp
Copy link
Mannequin

wjp mannequin commented Sep 1, 2009

comment:26

For the cancel button not working, see the patch at #6856. (I created that ticket before seeing the issue was already mentioned here.)

@wjp
Copy link
Mannequin

wjp mannequin commented Sep 1, 2009

comment:27

I don't understand how (or if?) this patch implements the mentioned temporary password functionality. There is a new '__temporary_password' variable, but that doesn't seem to be used.

@dandrake
Copy link
Contributor

dandrake commented Sep 1, 2009

comment:28

Replying to @wjp:

I don't understand how (or if?) this patch implements the mentioned temporary password functionality. There is a new '__temporary_password' variable, but that doesn't seem to be used.

When one adds a new user, you get a page saying "The temporary password for the new user foo is 52oN5g2a". Unfortunately, that password does not seem to be temporary; the new user can log in and out, and back in again with that password. When I read "temporary password", I think that the user will be able to log in once, and then be forced to change the password right away.

Another problem with the temporary password page is that the title of the page is "Error", even though there's no error.

That said: this patch, along with #6856 (which I just positively reviewed) does give us the basic functionality for adding users and resetting passwords from inside the notebook, which is something I'd really like. The last patch applies cleanly to 4.1.1. What do people think of merging this and opening a new ticket to fix the temporary password bits? (Or changing this patch so that it doesn't claim that the new password is temporary?)

@wjp
Copy link
Mannequin

wjp mannequin commented Sep 2, 2009

comment:29

I'd agree with not holding up this patch because of this, because it is already a very useful feature to have.

This patch does probably have to be rebased against #6568, though.

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

rebased against 4.1.1 + #6568

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

Author: Timothy Clemans

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

comment:30

Attachment: trac_4135.4.patch.gz

Rebased patch up. This should apply cleanly to the release manager's 4.1.2.alpha tree. I am going to change this to a positive review and open a new ticket for the temporary password business.

Release manager: apply only attachment: trac_4135.4.patch.

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

Reviewer: Tim Dumol, Dan Drake

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

comment:31

The temporary password ticket is #6871.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 3, 2009

comment:32

I got two hunk failures when merging trac_4135.4.patch:

[mvngu@mod sage-main]$ hg qimport https://github.com/sagemath/sage-prod/files/10642046/trac_4135.4.patch.gz && hg qpush
adding trac_4135.4.patch to series file
applying trac_4135.4.patch
patching file sage/server/notebook/twist.py
Hunk #6 FAILED at 217
Hunk #69 FAILED at 1747
2 out of 102 hunks FAILED -- saving rejects to file sage/server/notebook/twist.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
Errors during apply, please fix and refresh trac_4135.4.patch

This might depend on #6742, #6840, and #6568.

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

comment:33

Replying to @sagetrac-mvngu:

I got two hunk failures when merging trac_4135.4.patch:

(snip)

This might depend on #6742, #6840, and #6568.

I tried applying the patch here on top of a 4.1.1 tree that already had the patches from those three tickets applied, and I get a different hunk that won't apply. Perhaps I'll wait for the alpha0 tarball to be released and rebase the patch here based on that...or, you could hg serve your merge tree and let me pull from that.

@dandrake
Copy link
Contributor

dandrake commented Sep 3, 2009

Attachment: trac_4135.5.patch.gz

rebased against mvngu's 4.1.2.alpha0 merge tree

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 3, 2009

comment:34

Merged trac_4135.5.patch. See #6874 for a follow-up to this ticket.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 3, 2009

Merged: Sage 4.1.2.alpha0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants