Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Perms fix (#78)
Browse files Browse the repository at this point in the history
* enable setting of perms

* test dry run fix

* add more verbose logging

* rm test user
  • Loading branch information
Pheenoh authored May 3, 2024
1 parent dbff994 commit 0a50b38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/sync-users-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
pull_request:
branches:
- main
paths:
- 'users.yaml'
jobs:
sync-users-check:
runs-on: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions manage-users.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def remove_ghidra_users(current_users,yaml_users,dry_run):
print(ghidra_user, "isn't in the source control list anymore. Removing...",end='')

if not dry_run:
remove_user(ghidra_user)
# Commenting this out for now
# remove_user(ghidra_user)
print("Done.")
else:
print("Dry run mode. Skipping.")
Expand Down Expand Up @@ -236,7 +237,7 @@ def add_ghidra_users(current_users,yaml_users,dry_run):
print("Setting permissions for", ghidra_user["ghidraName"] + "...", end='')

if not dry_run:
# check_and_set_permission(ghidra_user["ghidraName"], ghidra_user["permissions"])
check_and_set_permission(ghidra_user["ghidraName"], ghidra_user["permissions"])
print("Done.")
else:
print("Dry run mode. Skipping.")
Expand Down Expand Up @@ -266,6 +267,7 @@ def manage_users(dry_run=False):

if dry_run:
if rm_users > 0 or update_users > 0:
print("Users are being updated or deleted. Failing automerge check!")
sys.exit(1)
elif add_users["num_users"] > 0:
for permission in add_users["permissions"]:
Expand Down

0 comments on commit 0a50b38

Please sign in to comment.