license: dropping PhoneNumber field from the license (#14307)

Per request of the bix team and checking the code this field is not used
in any place and also is one information that is not needed at all.
This commit is contained in:
Carlos Tadeu Panato Junior
2020-04-20 14:20:35 +02:00
committed by GitHub
parent cff7de9e68
commit 0d0ab51876
4 changed files with 8 additions and 13 deletions
-1
View File
@@ -204,7 +204,6 @@ func (a *App) GetSanitizedClientLicense() map[string]string {
delete(sanitizedLicense, "Id")
delete(sanitizedLicense, "Name")
delete(sanitizedLicense, "Email")
delete(sanitizedLicense, "PhoneNumber")
delete(sanitizedLicense, "IssuedAt")
delete(sanitizedLicense, "StartsAt")
delete(sanitizedLicense, "ExpiresAt")
+4 -5
View File
@@ -32,11 +32,10 @@ type License struct {
}
type Customer struct {
Id string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Company string `json:"company"`
PhoneNumber string `json:"phone_number"`
Id string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Company string `json:"company"`
}
type Features struct {
+4 -6
View File
@@ -136,11 +136,10 @@ func TestLicenseToFromJson(t *testing.T) {
StartsAt: GetMillis(),
ExpiresAt: GetMillis(),
Customer: &Customer{
Id: NewId(),
Name: NewId(),
Email: NewId(),
Company: NewId(),
PhoneNumber: NewId(),
Id: NewId(),
Name: NewId(),
Email: NewId(),
Company: NewId(),
},
Features: &f,
}
@@ -159,7 +158,6 @@ func TestLicenseToFromJson(t *testing.T) {
CheckString(t, l1.Customer.Name, l.Customer.Name)
CheckString(t, l1.Customer.Email, l.Customer.Email)
CheckString(t, l1.Customer.Company, l.Customer.Company)
CheckString(t, l1.Customer.PhoneNumber, l.Customer.PhoneNumber)
f1 := l1.Features
-1
View File
@@ -151,7 +151,6 @@ func GetClientLicense(l *model.License) map[string]string {
props["Name"] = l.Customer.Name
props["Email"] = l.Customer.Email
props["Company"] = l.Customer.Company
props["PhoneNumber"] = l.Customer.PhoneNumber
props["EmailNotificationContents"] = strconv.FormatBool(*l.Features.EmailNotificationContents)
props["MessageExport"] = strconv.FormatBool(*l.Features.MessageExport)
props["CustomPermissionsSchemes"] = strconv.FormatBool(*l.Features.CustomPermissionsSchemes)