Ticket #4135 (assigned enhancement)

Opened 2 months ago

Last modified 1 week ago

[with patch, needs review] notebook -- user management features

Reported by: TimothyClemans Assigned to: TimothyClemans (accepted)
Priority: major Milestone: sage-3.2.1
Component: notebook Keywords:
Cc:

Description

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)

Attachments

sage-4135_3.patch (15.0 kB) - added by TimothyClemans on 11/10/2008 05:21:39 PM.

Change History

09/16/2008 09:45:46 AM changed by TimothyClemans

Depends on #4134 and #2407

09/16/2008 03:01:34 PM changed by mabshoff

  • milestone changed from sage-3.1.2 to sage-3.1.3.

09/25/2008 10:32:00 PM changed by ddrake

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?

09/29/2008 11:57:24 AM changed by TimothyClemans

This ticket has been rebased.

09/29/2008 02:11:19 PM changed by jason

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

09/29/2008 02:15:13 PM changed by TimothyClemans

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

(follow-up: ↓ 8 ) 09/29/2008 06:40:34 PM changed by ddrake

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?

(in reply to: ↑ 7 ) 09/29/2008 07:03:25 PM changed by TimothyClemans

Replying to ddrake:

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('http://trac.sagemath.org/sage_trac/attachment/ticket/4135/extcode-4135_1.patch')

09/29/2008 07:57:43 PM changed by jason

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

10/23/2008 05:02:48 PM changed by mhansen

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

11/08/2008 05:33:45 PM changed by TimothyClemans

  • summary changed from [with patch, needs review] notebook -- user management features to [with patch, needs work] notebook -- user management features.

11/10/2008 05:21:39 PM changed by TimothyClemans

  • attachment sage-4135_3.patch added.

11/10/2008 05:23:52 PM changed by TimothyClemans

  • summary changed from [with patch, needs work] notebook -- user management features to [with patch, needs review] notebook -- user management features.

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

11/10/2008 05:24:09 PM changed by TimothyClemans

  • owner changed from boothby to TimothyClemans.
  • status changed from new to assigned.
  • type changed from defect to enhancement.

11/10/2008 09:20:28 PM changed by TimothyClemans

Depends on #3950

11/10/2008 09:33:00 PM changed by TimothyClemans

Don't apply extcode-4135_1.patch afterall