Skip to content

Commit c18c545

Browse files
committed
modify list so only non-admin users are captured
1 parent 93b03f6 commit c18c545

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

team_user_reporting/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ def main():
4343
for user_role in team['userRoles']:
4444
user_id = user_role['userId']
4545
user_name = user_role['userName']
46-
47-
csv_writer.writerow([team_name, user_id, user_name])
46+
47+
# Only capture non-admin users
48+
if user_role['admin'] == False:
49+
csv_writer.writerow([team_name, user_id, user_name])
4850

4951
print(f"CSV file '{args.csv_file_name}' has been created.")
5052

0 commit comments

Comments
 (0)