Skip to content

Commit

Permalink
add admin ignore option (Netflix#9279)
Browse files Browse the repository at this point in the history
* add admin ignore option

* check var

Co-authored-by: Alex Bainbridge <[email protected]>
  • Loading branch information
Dreadwall and Alex Bainbridge authored Nov 19, 2021
1 parent 203d076 commit 0dda1b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions consoleme/lib/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ async def send_slack_notification_new_policy_request(
Sends a notification using specified webhook URL about a new request created
"""

if admin_approved and config.get("slack.ignore_auto_admin_policies", False):
# Don't send slack notifications for policies that were auto approved due to admin status
return None

function = f"{__name__}.{sys._getframe().f_code.co_name}"
requester = extended_request.requester_email
arn = extended_request.principal.principal_arn
Expand Down

0 comments on commit 0dda1b2

Please sign in to comment.