Refactored to rename "service terms" to "terms of service" (#9581)

* #124 renamed identififers from service terms to terms of service

* #124 renamed identififers from service terms to terms of service

* 124 renamed ServiceTerms model to TermsOfService

* 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService

* 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService

* #124 fixed formatting

* #124 fixed formatting

* #132 renamed table ServiceTerms to TermsOfService

* #124 renamed some missed files from 'service_terms' to 'terms_of_service'

* #124 removed fixed TODOs

* drop migrate of ServiceTerms table, since backporting

* s/ServiceTerms/TermsOfService/ in tests

* s/AcceptedServiceTermsId/AcceptedTermsOfServiceId/

Change the model attribute, even though the column name will eventually be removed.

* s/accepted_service_terms_id/accepted_terms_of_service_id/ to match redux

* s/serviceTerms/termsOfService

* rename column too, and add max size constraint

* s/EnableCustomServiceTerms/EnableCustomTermsOfService
Этот коммит содержится в:
Harshil Sharma
2018-10-10 00:55:47 +00:00
коммит произвёл Jesse Hallam
родитель 59319b7915
Коммит bffcccf99d
37 изменённых файлов: 630 добавлений и 629 удалений

Просмотреть файл

@@ -1652,16 +1652,16 @@ func (a *App) UpdateOAuthUserAttrs(userData io.Reader, user *model.User, provide
return nil
}
func (a *App) RecordUserServiceTermsAction(userId, serviceTermsId string, accepted bool) *model.AppError {
func (a *App) RecordUserTermsOfServiceAction(userId, termsOfServiceId string, accepted bool) *model.AppError {
user, err := a.GetUser(userId)
if err != nil {
return err
}
if accepted {
user.AcceptedServiceTermsId = serviceTermsId
user.AcceptedTermsOfServiceId = termsOfServiceId
} else {
user.AcceptedServiceTermsId = ""
user.AcceptedTermsOfServiceId = ""
}
_, err = a.UpdateUser(user, false)
if err != nil {