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

« back to all changes in this revision

Viewing changes to bin/ivle-makeuser

  • Committer: Matt Giuca
  • Date: 2009-02-24 02:02:03 UTC
  • mto: This revision was merged to the branch mainline in revision 1119.
  • Revision ID: matt.giuca@gmail.com-20090224020203-aqdcjnsj6y7wl32o
Added a new look to the IVLE header bar. Mmmm... Web 2.0.
Added top-level directory image-source, containing SVG and script files for
    generating the images.
ivle/webapp/coremedia/images: Added 'chrome' directory containing the rendered
    images.
Modified ivle/webapp/base/ivle-headings.html and
    ivle/webapp/coremedia/ivle.css to support the new images.
    Note that the H1 and H2 at the top of the page are no longer displayed
    (and their custom styles have been removed). There is a heading image
    instead.

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
39
38
from ivle.database import get_store, User
40
39
from ivle.pulldown_subj import enrol_user
41
40
 
42
41
# Requireds and optionals will be used to display the usage message
43
42
# AND do argument processing
44
43
# The names here must correspond to the fields in the database.
45
 
requireds = ["login", "fullname"]
 
44
requireds = ["login", "fullname", "rolenm"]
46
45
optionals = [
47
46
    ('p', 'password', "Cleartext password for this user"),
48
47
    ('n', 'nick', "Display name (defaults to <fullname>)"),
81
80
if 'nick' not in user:
82
81
    user['nick'] = user['fullname']
83
82
 
84
 
store = get_store(Config())
 
83
store = get_store()
85
84
 
86
85
try:
87
86
    # Make the user's database entry