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

Update X of Y notification step labeling to calculate total steps based on enabled features #65

Open
atc0005 opened this issue Jun 28, 2020 · 0 comments
Labels
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Jun 28, 2020

As of this writing this only applies to Teams notifications, but it's worth thinking about in a larger scope.

Snippet from a switch statement responsible for setting a message card Title field:

case events.ActionSuccessDisableRequestReceived, events.ActionFailureDisableRequestReceived:
	msgCardTitle = msgCardTitlePrefix + "[step 1 of 3] " + record.Action

case events.ActionSuccessDisabledUsername, events.ActionFailureDisabledUsername:
	msgCardTitle = msgCardTitlePrefix + "[step 2 of 3] " + record.Action

case events.ActionSuccessDuplicatedUsername, events.ActionFailureDuplicatedUsername:
	msgCardTitle = msgCardTitlePrefix + "[step 2 of 3] " + record.Action

case events.ActionSuccessIgnoredUsername, events.ActionFailureIgnoredUsername:
	msgCardTitle = msgCardTitlePrefix + "[step 2 of 3] " + record.Action

case events.ActionSuccessIgnoredIPAddress, events.ActionFailureIgnoredIPAddress:
	msgCardTitle = msgCardTitlePrefix + "[step 2 of 3] " + record.Action

case events.ActionSuccessTerminatedUserSession, events.ActionFailureTerminatedUserSession:
	msgCardTitle = msgCardTitlePrefix + "[step 3 of 3] " + record.Action

Ideally the of 3 bit wouldn't be static and would be determined solely by the list of enabled features. As of this issue, this mostly pertains to sessions termination support which can be either enabled or disabled. Additionally, this section is never reached if the reported username (or associated IP Address) is in an "ignored" file (and that file is referenced by the config settings).

@atc0005 atc0005 added this to the Future milestone Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant