Commit 3526abc
committed
feat: add protection lease concept for time-limited clone protection
Instead of infinite deletion protection, clones now get protected for a
configurable period. Key changes:
- Add protectionLeaseDurationMinutes config (default: 7 days)
- Add protectionRenewalDurationMinutes config (default: 3 days)
- Add protectionExpiryWarningMinutes config for warning notifications
- Add ProtectedTill field to Clone model with IsProtected() method
- Add background job to check lease expiry and send webhook warnings
- Add clone_protection_expiring and clone_protection_expired webhooks
- Update UI to show lease duration, expiry time, and renew button
- Update API to support renewLease parameter for lease renewal1 parent 583e4dd commit 3526abc
18 files changed
Lines changed: 422 additions & 47 deletions
File tree
- engine
- api/swagger-spec
- configs
- internal
- cloning
- webhooks
- pkg
- client/dblabapi/types
- models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
1634 | 1638 | | |
1635 | 1639 | | |
1636 | 1640 | | |
| |||
1658 | 1662 | | |
1659 | 1663 | | |
1660 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
1661 | 1673 | | |
1662 | 1674 | | |
1663 | 1675 | | |
| |||
1703 | 1715 | | |
1704 | 1716 | | |
1705 | 1717 | | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
1706 | 1722 | | |
1707 | 1723 | | |
1708 | 1724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1068 | 1072 | | |
1069 | 1073 | | |
1070 | 1074 | | |
| |||
1093 | 1097 | | |
1094 | 1098 | | |
1095 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1096 | 1108 | | |
1097 | 1109 | | |
1098 | 1110 | | |
| |||
1136 | 1148 | | |
1137 | 1149 | | |
1138 | 1150 | | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1139 | 1155 | | |
1140 | 1156 | | |
1141 | 1157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
0 commit comments