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

« back to all changes in this revision

Viewing changes to ivle/makeuser.py

  • Committer: me at id
  • Date: 2009-01-15 01:29:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:branches%2Fstorm:1147
ivle.makeuser: Don't create a local.auth. It wasn't used anywhere, and seems
    to have only been there for historical reasons.
setup.configure: Remove svn_auth_local from the config.py boilerplate; it was
    used solely by ivle.makeuser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
def make_svn_auth(store, login, throw_on_error=True):
133
133
    """Setup svn authentication for the given user.
134
134
       Uses the given DB store object. Does not commit to the db.
135
 
       FIXME: create local.auth entry
136
135
    """
137
136
    passwd = md5.new(uuid.uuid4().bytes).digest().encode('hex')
138
137
    if os.path.exists(ivle.conf.svn_auth_ivle):
344
343
    dbconn.create_user(**kwargs)
345
344
    dbconn.close()
346
345
 
347
 
    if kwargs['password']:
348
 
        if os.path.exists(ivle.conf.svn_auth_local):
349
 
            create = ""
350
 
        else:
351
 
            create = "c"
352
 
        res = os.system("htpasswd -%smb %s %s %s" % (create,
353
 
                                                     ivle.conf.svn_auth_local,
354
 
                                                     kwargs['login'],
355
 
                                                     kwargs['password']))
356
 
        if res != 0 and throw_on_error:
357
 
            raise Exception("Unable to create local-auth for %s" % kwargs['login'])
358
 
 
359
 
    # Make sure the file is owned by the web server
360
 
    if create == "c":
361
 
        chown_to_webserver(ivle.conf.svn_auth_local)
362
 
 
363
346
    # Pulldown subjects and add enrolments
364
347
    ivle.pulldown_subj.enrol_user(kwargs['login'])
365
348