Skip to content

Commit 2458bc9

Browse files
authored
Merge pull request #285 from LalitDeore/marketplace-test
Add 30 day delay for production status off
2 parents 99247a2 + 15b0e3b commit 2458bc9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

shared.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,16 @@ func HandleGetOrg(resp http.ResponseWriter, request *http.Request) {
11491149
}
11501150
}
11511151

1152+
if project.Environment == "onprem" && org.Created > 0 {
1153+
1154+
nowUnix := time.Now().Unix()
1155+
1156+
thirtyDays := int64(30 * 24 * 60 * 60)
1157+
isAfter30Days := nowUnix >= org.Created+thirtyDays
1158+
1159+
org.OldOrg = isAfter30Days
1160+
}
1161+
11521162
// Make sure to add all orgs that are childs IF you have access
11531163
org.ChildOrgs = []OrgMini{}
11541164

structs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,7 @@ type Org struct {
10971097
CreatorOrg string `json:"creator_org" datastore:"creator_org"`
10981098
Branding OrgBranding `json:"branding" datastore:"branding"`
10991099
Licensed bool `json:"licensed" datastore:"licensed"` //Track onprem license
1100+
OldOrg bool `json:"old_org" datastore:"old_org"` // This is true for org older then 30 days
11001101
}
11011102

11021103
type Billing struct {

0 commit comments

Comments
 (0)