|
|
@ -90,7 +90,7 @@ def retire_user( |
|
|
|
): |
|
|
|
): |
|
|
|
config = get_config(svn_dir, authz) |
|
|
|
config = get_config(svn_dir, authz) |
|
|
|
if username not in config.elab_users: |
|
|
|
if username not in config.elab_users: |
|
|
|
sys.exit("User {username} not found.") |
|
|
|
sys.exit(f"User {username} not found.") |
|
|
|
user = config.elab_users[username] |
|
|
|
user = config.elab_users[username] |
|
|
|
if user.group == ALUMNI: |
|
|
|
if user.group == ALUMNI: |
|
|
|
sys.exit(f"User '{username}' is already in group '{ALUMNI}'") |
|
|
|
sys.exit(f"User '{username}' is already in group '{ALUMNI}'") |
|
|
@ -116,7 +116,7 @@ def change_password( |
|
|
|
): |
|
|
|
): |
|
|
|
config = get_config(svn_dir, authz) |
|
|
|
config = get_config(svn_dir, authz) |
|
|
|
if username not in config.elab_users: |
|
|
|
if username not in config.elab_users: |
|
|
|
sys.exit("User {username} not found.") |
|
|
|
sys.exit(f"User {username} not found.") |
|
|
|
user = config.elab_users[username] |
|
|
|
user = config.elab_users[username] |
|
|
|
password = user.set_new_password(svn_dir / htpwd, handler=handler) |
|
|
|
password = user.set_new_password(svn_dir / htpwd, handler=handler) |
|
|
|
print("New password for :") |
|
|
|
print("New password for :") |
|
|
@ -127,7 +127,7 @@ def change_password( |
|
|
|
def show_user_info(username, svn_dir=SVN_REPOS_PATH, authz=AUTHZ_FILE_NAME): |
|
|
|
def show_user_info(username, svn_dir=SVN_REPOS_PATH, authz=AUTHZ_FILE_NAME): |
|
|
|
config = get_config(svn_dir, authz) |
|
|
|
config = get_config(svn_dir, authz) |
|
|
|
if username not in config.elab_users: |
|
|
|
if username not in config.elab_users: |
|
|
|
sys.exit("User {username} not found.") |
|
|
|
sys.exit(f"User {username} not found.") |
|
|
|
|
|
|
|
|
|
|
|
user = config.elab_users[username] |
|
|
|
user = config.elab_users[username] |
|
|
|
print(f"User {user.name} is in group '{user.group}':") |
|
|
|
print(f"User {user.name} is in group '{user.group}':") |
|
|
|