Skip to content

Commit 419b06f

Browse files
committed
feat: expand capability of '*' querying action table
1 parent 45e003d commit 419b06f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

policy_sentry/querying/actions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ def get_action_data(service: str, action_name: str) -> dict[str, list[dict[str,
6262
action_data_results = {}
6363
try:
6464
service_prefix_data = get_service_prefix_data(service)
65-
if action_name == "*":
65+
if action_name.endswith("*"):
66+
stripped_action_name = action_name.removesuffix("*")
6667
results = []
6768
for this_action_name, this_action_data in service_prefix_data["privileges"].items():
69+
if not this_action_name.startswith(stripped_action_name):
70+
continue
6871
if this_action_data:
6972
entries = create_action_data_entries(
7073
service_prefix_data=service_prefix_data,

0 commit comments

Comments
 (0)