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

« back to all changes in this revision

Viewing changes to scripts/usrmgt-server

  • Committer: mattgiuca
  • Date: 2008-02-22 06:40:38 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:551
userservice/usrmgt-server: Added update_user action to both.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
    return int(props['unixid'])
81
81
 
 
82
def update_user(props):
 
83
    """Create the database record for the given user.
 
84
       Expected properties:
 
85
        login       - user who is making the change (not necessarily the one
 
86
                      being updated).
 
87
        update      - dict of fields to be updated. The fields are all those
 
88
                      in the login table of the db.
 
89
                      'login' required.
 
90
                      Omitted fields will not be set.
 
91
    """
 
92
    update = props['update']
 
93
    # Note: "login" is special - it is not part of the kwargs to
 
94
    # db.update_user, but the first arg - used to find the user to update.
 
95
    # However it doesn't need any special treatment here.
 
96
 
 
97
    db = common.db.DB()
 
98
    db.update_user(**update)
 
99
    db.close()
 
100
 
82
101
def get_login(login, passwd, _realm, _login, _may_save):
83
102
    """Callback function used by pysvn for authentication.
84
103
    """
204
223
 
205
224
actions = {
206
225
        'create_user':create_user,
207
 
        'activate_user':activate_user
 
226
        'update_user':update_user,
 
227
        'activate_user':activate_user,
208
228
    }
209
229
 
210
230
def log(msg):