PLT-2115 Adding compliance
Этот коммит содержится в:
@@ -238,5 +238,7 @@ func getClientConfig(c *model.Config) map[string]string {
|
||||
|
||||
props["AllowCorsFrom"] = *c.ServiceSettings.AllowCorsFrom
|
||||
|
||||
props["EnableCompliance"] = strconv.FormatBool(*c.ComplianceSettings.Enable)
|
||||
|
||||
return props
|
||||
}
|
||||
|
||||
@@ -23,7 +23,16 @@ type HTMLTemplate struct {
|
||||
}
|
||||
|
||||
func InitHTML() {
|
||||
templatesDir := FindDir("templates")
|
||||
InitHTMLWithDir("templates")
|
||||
}
|
||||
|
||||
func InitHTMLWithDir(dir string) {
|
||||
|
||||
if htmlTemplates != nil {
|
||||
return
|
||||
}
|
||||
|
||||
templatesDir := FindDir(dir)
|
||||
l4g.Debug(T("api.api.init.parsing_templates.debug"), templatesDir)
|
||||
var err error
|
||||
if htmlTemplates, err = template.ParseGlob(templatesDir + "*.html"); err != nil {
|
||||
|
||||
@@ -16,7 +16,11 @@ var T i18n.TranslateFunc
|
||||
var locales map[string]string = make(map[string]string)
|
||||
|
||||
func InitTranslations() {
|
||||
i18nDirectory := FindDir("i18n")
|
||||
InitTranslationsWithDir("i18n")
|
||||
}
|
||||
|
||||
func InitTranslationsWithDir(dir string) {
|
||||
i18nDirectory := FindDir(dir)
|
||||
files, _ := ioutil.ReadDir(i18nDirectory)
|
||||
for _, f := range files {
|
||||
if filepath.Ext(f.Name()) == ".json" {
|
||||
|
||||
@@ -115,6 +115,7 @@ func getClientLicense(l *model.License) map[string]string {
|
||||
props["Users"] = strconv.Itoa(*l.Features.Users)
|
||||
props["LDAP"] = strconv.FormatBool(*l.Features.LDAP)
|
||||
props["GoogleSSO"] = strconv.FormatBool(*l.Features.GoogleSSO)
|
||||
props["Compliance"] = strconv.FormatBool(*l.Features.Compliance)
|
||||
props["IssuedAt"] = strconv.FormatInt(l.IssuedAt, 10)
|
||||
props["StartsAt"] = strconv.FormatInt(l.StartsAt, 10)
|
||||
props["ExpiresAt"] = strconv.FormatInt(l.ExpiresAt, 10)
|
||||
|
||||
Ссылка в новой задаче
Block a user