Commit 951f831
committed
fix(sherweb): stop migration tasks from running after extension disable
Two defects allowed Invoke-SherwebMigration scheduled tasks to keep
firing daily (sending alerts and performing real Sherweb purchases and
Pax8 subscription cancellations) after the Sherweb migration was
disabled:
- Invoke-SherwebMigration had no enabled-guard: it read the Sherweb
extension config but never checked Enabled before acting. It now
returns immediately unless the Sherweb config exists and Enabled is
true, which neutralizes any stale scheduled task.
- Register-CIPPExtensionScheduledTasks created migration tasks in the
enable branch, but the disable cleanup only filtered
Push-CippExtensionData tasks, so migration tasks were never removed.
Migration tasks are now queried at function scope, removed when the
Sherweb extension is disabled, and removed when a tenant is no longer
Sherweb-mapped.1 parent 784cff5 commit 951f831
2 files changed
Lines changed: 21 additions & 1 deletion
File tree
- Modules/CippExtensions/Public
- Extension Functions
- Sherweb
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| |||
163 | 171 | | |
164 | 172 | | |
165 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
166 | 181 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
0 commit comments