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.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cff7de9e68
Коммит
0d0ab51876
@@ -204,7 +204,6 @@ func (a *App) GetSanitizedClientLicense() map[string]string {
|
|||||||
delete(sanitizedLicense, "Id")
|
delete(sanitizedLicense, "Id")
|
||||||
delete(sanitizedLicense, "Name")
|
delete(sanitizedLicense, "Name")
|
||||||
delete(sanitizedLicense, "Email")
|
delete(sanitizedLicense, "Email")
|
||||||
delete(sanitizedLicense, "PhoneNumber")
|
|
||||||
delete(sanitizedLicense, "IssuedAt")
|
delete(sanitizedLicense, "IssuedAt")
|
||||||
delete(sanitizedLicense, "StartsAt")
|
delete(sanitizedLicense, "StartsAt")
|
||||||
delete(sanitizedLicense, "ExpiresAt")
|
delete(sanitizedLicense, "ExpiresAt")
|
||||||
|
|||||||
@@ -32,11 +32,10 @@ type License struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Customer struct {
|
type Customer struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Company string `json:"company"`
|
Company string `json:"company"`
|
||||||
PhoneNumber string `json:"phone_number"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Features struct {
|
type Features struct {
|
||||||
|
|||||||
@@ -136,11 +136,10 @@ func TestLicenseToFromJson(t *testing.T) {
|
|||||||
StartsAt: GetMillis(),
|
StartsAt: GetMillis(),
|
||||||
ExpiresAt: GetMillis(),
|
ExpiresAt: GetMillis(),
|
||||||
Customer: &Customer{
|
Customer: &Customer{
|
||||||
Id: NewId(),
|
Id: NewId(),
|
||||||
Name: NewId(),
|
Name: NewId(),
|
||||||
Email: NewId(),
|
Email: NewId(),
|
||||||
Company: NewId(),
|
Company: NewId(),
|
||||||
PhoneNumber: NewId(),
|
|
||||||
},
|
},
|
||||||
Features: &f,
|
Features: &f,
|
||||||
}
|
}
|
||||||
@@ -159,7 +158,6 @@ func TestLicenseToFromJson(t *testing.T) {
|
|||||||
CheckString(t, l1.Customer.Name, l.Customer.Name)
|
CheckString(t, l1.Customer.Name, l.Customer.Name)
|
||||||
CheckString(t, l1.Customer.Email, l.Customer.Email)
|
CheckString(t, l1.Customer.Email, l.Customer.Email)
|
||||||
CheckString(t, l1.Customer.Company, l.Customer.Company)
|
CheckString(t, l1.Customer.Company, l.Customer.Company)
|
||||||
CheckString(t, l1.Customer.PhoneNumber, l.Customer.PhoneNumber)
|
|
||||||
|
|
||||||
f1 := l1.Features
|
f1 := l1.Features
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ func GetClientLicense(l *model.License) map[string]string {
|
|||||||
props["Name"] = l.Customer.Name
|
props["Name"] = l.Customer.Name
|
||||||
props["Email"] = l.Customer.Email
|
props["Email"] = l.Customer.Email
|
||||||
props["Company"] = l.Customer.Company
|
props["Company"] = l.Customer.Company
|
||||||
props["PhoneNumber"] = l.Customer.PhoneNumber
|
|
||||||
props["EmailNotificationContents"] = strconv.FormatBool(*l.Features.EmailNotificationContents)
|
props["EmailNotificationContents"] = strconv.FormatBool(*l.Features.EmailNotificationContents)
|
||||||
props["MessageExport"] = strconv.FormatBool(*l.Features.MessageExport)
|
props["MessageExport"] = strconv.FormatBool(*l.Features.MessageExport)
|
||||||
props["CustomPermissionsSchemes"] = strconv.FormatBool(*l.Features.CustomPermissionsSchemes)
|
props["CustomPermissionsSchemes"] = strconv.FormatBool(*l.Features.CustomPermissionsSchemes)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user