Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,16 @@ func HandleGetOrg(resp http.ResponseWriter, request *http.Request) {
}
}

if project.Environment == "onprem" && org.Created > 0 {

nowUnix := time.Now().Unix()

thirtyDays := int64(30 * 24 * 60 * 60)
isAfter30Days := nowUnix >= org.Created+thirtyDays

org.OldOrg = isAfter30Days
}

// Make sure to add all orgs that are childs IF you have access
org.ChildOrgs = []OrgMini{}

Expand Down
1 change: 1 addition & 0 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ type Org struct {
CreatorOrg string `json:"creator_org" datastore:"creator_org"`
Branding OrgBranding `json:"branding" datastore:"branding"`
Licensed bool `json:"licensed" datastore:"licensed"` //Track onprem license
OldOrg bool `json:"old_org" datastore:"old_org"` // This is true for org older then 30 days
}

type Billing struct {
Expand Down
Loading