diff options
author | Richard Jones <richard@mechanicalcat.net> | 2013-02-14 14:23:41 +1100 |
---|---|---|
committer | Richard Jones <richard@mechanicalcat.net> | 2013-02-14 14:23:41 +1100 |
commit | acd3f6f37de42e55093884ac31d2e477d7c9c819 (patch) | |
tree | 730a05c6ecee625425b7842286990973a9128756 /admin.py | |
parent | f376646bdb82142840fa7cedbe846fbed736a011 (diff) | |
download | decorator-acd3f6f37de42e55093884ac31d2e477d7c9c819.tar.gz |
improved password reset with no emailing of passwords
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -187,6 +187,16 @@ def merge_user(store, old, new): c.execute('update comments_journal set submitted_by=%s where submitted_by=%s', (new, old)) c.execute('delete from users where name=%s', (old,)) +def show_user(store, user): + c = store.get_cursor() + user = store.get_user() + if not user: + sys.exit('user %r does not exist' % user) + for key in user.keys(): + print '%s: %s' % (key, user[key]) + for p in store.get_user_packages(user): + print '%s: %s' % (p['package_name'], p['role_name']) + def nuke_nested_lists(store, confirm=False): c = store.get_cursor() c.execute("""select name, version, summary from releases @@ -257,6 +267,8 @@ if __name__ == '__main__': nuke_nested_lists(*args) elif command == 'keyrotate': keyrotate(config, *args) + elif command == 'user': + show_user(*args) else: print "unknown command '%s'!"%command st.changed() |