Skip to content

Commit

Permalink
Allow users to be on both pull and push buckets (#37)
Browse files Browse the repository at this point in the history
Fixes collision when user is on pull and push
  • Loading branch information
jhpyke committed Jun 15, 2023
1 parent 8ebf8ae commit 632e3ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
)
for user in users:
RolePolicy(
resource_name=user,
resource_name=user + "_exports_pull",
policy=role_policy.json,
role=user,
name=f"hub-exports-pull-{name}",
Expand Down
2 changes: 1 addition & 1 deletion data_engineering_exports/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def __init__(self, username: str, export_bucket: Bucket, prefixes: List[str]):
)
)
self._role_policy = RolePolicy(
resource_name=username,
resource_name=username + "_exports_push",
policy=self._policy_document.json,
role=username,
name="hub_exports",
Expand Down
2 changes: 1 addition & 1 deletion pull_datasets/pull_permission_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: pull-permission-test
pull_arns:
- arn:aws:iam::684969100054:role/restricted-admin
users:
- alpha_user_mralecjohnson
- alpha_user_jhpyke

0 comments on commit 632e3ab

Please sign in to comment.