~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to bin/ivle-makeuser

  • Committer: Matt Giuca
  • Date: 2009-05-26 04:15:23 UTC
  • mto: This revision was merged to the branch mainline in revision 1322.
  • Revision ID: matt.giuca@gmail.com-20090526041523-hsg5q2enlhvjb5y2
doc/man/architecture.rst: User management server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    print "Must run %s as root." % os.path.basename(sys.argv[0])
36
36
    sys.exit(1)
37
37
 
 
38
from ivle.config import Config
38
39
from ivle.database import get_store, User
39
40
from ivle.pulldown_subj import enrol_user
40
41
 
41
42
# Requireds and optionals will be used to display the usage message
42
43
# AND do argument processing
43
44
# The names here must correspond to the fields in the database.
44
 
requireds = ["login", "fullname", "rolenm"]
 
45
requireds = ["login", "fullname"]
45
46
optionals = [
46
47
    ('p', 'password', "Cleartext password for this user"),
47
48
    ('n', 'nick', "Display name (defaults to <fullname>)"),
80
81
if 'nick' not in user:
81
82
    user['nick'] = user['fullname']
82
83
 
83
 
store = get_store()
 
84
store = get_store(Config())
84
85
 
85
86
try:
86
87
    # Make the user's database entry