11
NOTICE.txt
11
NOTICE.txt
@@ -1,4 +1,11 @@
|
|||||||
Mattermost Platform Preview
|
Mattermost Platform Preview
|
||||||
Copyright 2015 SpinPunch, Inc.
|
© 2015 Spinpunch, Inc. All Rights Reserved. See LICENSE.txt for license information.
|
||||||
|
|
||||||
Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England. The original software is available from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
|
NOTICES:
|
||||||
|
|
||||||
|
This product contains a modified portion of 'draw2d', a Go library to draw 2d geometrical forms on images by Laurent Le Goff
|
||||||
|
|
||||||
|
* LICENSE:
|
||||||
|
* http://opensource.org/licenses/BSD-3-Clause (BSD 3-Clause)
|
||||||
|
* HOMEPAGE:
|
||||||
|
* https://code.google.com/p/draw2d/
|
||||||
|
|||||||
@@ -303,6 +303,10 @@ func IsTestDomain(r *http.Request) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Index(r.Host, "dockerhost") == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
if strings.Index(r.Host, "test") == 0 {
|
if strings.Index(r.Host, "test") == 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"LogSettings": {
|
"LogSettings": {
|
||||||
"ConsoleEnable": false,
|
"ConsoleEnable": true,
|
||||||
"ConsoleLevel": "DEBUG",
|
"ConsoleLevel": "INFO",
|
||||||
"FileEnable": true,
|
"FileEnable": true,
|
||||||
"FileLevel": "INFO",
|
"FileLevel": "INFO",
|
||||||
"FileFormat": "",
|
"FileFormat": "",
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
"SMTPPassword": "",
|
"SMTPPassword": "",
|
||||||
"SMTPServer": "localhost:25",
|
"SMTPServer": "localhost:25",
|
||||||
"UseTLS": false,
|
"UseTLS": false,
|
||||||
"FeedbackEmail": "feedback@xxxxxxmustbefilledin.com",
|
"FeedbackEmail": "",
|
||||||
"FeedbackName": "",
|
"FeedbackName": "",
|
||||||
"ApplePushServer": "",
|
"ApplePushServer": "",
|
||||||
"ApplePushCertPublic": "",
|
"ApplePushCertPublic": "",
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ var reservedDomains = []string{
|
|||||||
"channel",
|
"channel",
|
||||||
"internal",
|
"internal",
|
||||||
"localhost",
|
"localhost",
|
||||||
|
"dockerhost",
|
||||||
"stag",
|
"stag",
|
||||||
"post",
|
"post",
|
||||||
"cluster",
|
"cluster",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ package utils
|
|||||||
import (
|
import (
|
||||||
l4g "code.google.com/p/log4go"
|
l4g "code.google.com/p/log4go"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"net/mail"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
@@ -222,15 +223,20 @@ func LoadConfig(fileName string) {
|
|||||||
config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN")
|
config.ServiceSettings.Domain = os.Getenv("MATTERMOST_DOMAIN")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validates our mail settings
|
// Check for a valid email for feedback, if not then do feedback@domain
|
||||||
if err := CheckMailSettings(); err != nil {
|
if _, err := mail.ParseAddress(config.EmailSettings.FeedbackEmail); err != nil {
|
||||||
l4g.Error("Email settings are not valid err=%v", err)
|
config.EmailSettings.FeedbackEmail = "feedback@" + config.ServiceSettings.Domain
|
||||||
}
|
}
|
||||||
|
|
||||||
configureLog(config.LogSettings)
|
configureLog(config.LogSettings)
|
||||||
|
|
||||||
Cfg = &config
|
Cfg = &config
|
||||||
SanitizeOptions = getSanitizeOptions()
|
SanitizeOptions = getSanitizeOptions()
|
||||||
|
|
||||||
|
// Validates our mail settings
|
||||||
|
if err := CheckMailSettings(); err != nil {
|
||||||
|
l4g.Error("Email settings are not valid err=%v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getSanitizeOptions() map[string]bool {
|
func getSanitizeOptions() map[string]bool {
|
||||||
|
|||||||
@@ -85,20 +85,22 @@ module.exports = React.createClass({
|
|||||||
var postFiles = [];
|
var postFiles = [];
|
||||||
var images = [];
|
var images = [];
|
||||||
if (filenames) {
|
if (filenames) {
|
||||||
for (var i = 0; i < filenames.length && i < Constants.MAX_DISPLAY_FILES; i++) {
|
for (var i = 0; i < filenames.length; i++) {
|
||||||
var fileInfo = utils.splitFileLocation(filenames[i]);
|
var fileInfo = utils.splitFileLocation(filenames[i]);
|
||||||
if (Object.keys(fileInfo).length === 0) continue;
|
if (Object.keys(fileInfo).length === 0) continue;
|
||||||
|
|
||||||
var type = utils.getFileType(fileInfo.ext);
|
var type = utils.getFileType(fileInfo.ext);
|
||||||
|
|
||||||
if (type === "image") {
|
if (type === "image") {
|
||||||
|
if (i < Constants.MAX_DISPLAY_FILES) {
|
||||||
postFiles.push(
|
postFiles.push(
|
||||||
<div className="post-image__column" key={filenames[i]}>
|
<div className="post-image__column" key={filenames[i]}>
|
||||||
<a href="#" onClick={this.handleImageClick} data-img-id={images.length.toString()} data-toggle="modal" data-target={"#" + postImageModalId }><div ref={filenames[i]} className="post__load" style={{backgroundImage: 'url(/static/images/load.gif)'}}></div></a>
|
<a href="#" onClick={this.handleImageClick} data-img-id={images.length.toString()} data-toggle="modal" data-target={"#" + postImageModalId }><div ref={filenames[i]} className="post__load" style={{backgroundImage: 'url(/static/images/load.gif)'}}></div></a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
images.push(filenames[i]);
|
images.push(filenames[i]);
|
||||||
} else {
|
} else if (i < Constants.MAX_DISPLAY_FILES) {
|
||||||
postFiles.push(
|
postFiles.push(
|
||||||
<div className="post-image__column custom-file" key={fileInfo.name}>
|
<div className="post-image__column custom-file" key={fileInfo.name}>
|
||||||
<a href={fileInfo.path+"."+fileInfo.ext} download={fileInfo.name+"."+fileInfo.ext}>
|
<a href={fileInfo.path+"."+fileInfo.ext} download={fileInfo.name+"."+fileInfo.ext}>
|
||||||
|
|||||||
@@ -1056,7 +1056,7 @@ var AppearanceTab = React.createClass({
|
|||||||
|
|
||||||
themeSection = (
|
themeSection = (
|
||||||
<SettingItemMax
|
<SettingItemMax
|
||||||
title="Theme"
|
title="Theme Color"
|
||||||
inputs={inputs}
|
inputs={inputs}
|
||||||
submit={this.submitTheme}
|
submit={this.submitTheme}
|
||||||
server_error={server_error}
|
server_error={server_error}
|
||||||
@@ -1066,7 +1066,7 @@ var AppearanceTab = React.createClass({
|
|||||||
} else {
|
} else {
|
||||||
themeSection = (
|
themeSection = (
|
||||||
<SettingItemMin
|
<SettingItemMin
|
||||||
title="Theme"
|
title="Theme Color"
|
||||||
describe={this.state.theme}
|
describe={this.state.theme}
|
||||||
updateSection={function(){self.props.updateSection("theme");}}
|
updateSection={function(){self.props.updateSection("theme");}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ module.exports = {
|
|||||||
"channel",
|
"channel",
|
||||||
"internal",
|
"internal",
|
||||||
"localhost",
|
"localhost",
|
||||||
|
"dockerhost",
|
||||||
"stag",
|
"stag",
|
||||||
"post",
|
"post",
|
||||||
"cluster",
|
"cluster",
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ module.exports.isTestDomain = function() {
|
|||||||
if ((/^localhost/).test(window.location.hostname))
|
if ((/^localhost/).test(window.location.hostname))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if ((/^dockerhost/).test(window.location.hostname))
|
||||||
|
return true;
|
||||||
|
|
||||||
if ((/^test/).test(window.location.hostname))
|
if ((/^test/).test(window.location.hostname))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -75,8 +78,14 @@ module.exports.getDomainWithOutSub = function() {
|
|||||||
|
|
||||||
var parts = window.location.host.split(".");
|
var parts = window.location.host.split(".");
|
||||||
|
|
||||||
if (parts.length == 1)
|
if (parts.length == 1) {
|
||||||
|
if (parts[0].indexOf("dockerhost") > -1) {
|
||||||
|
return "dockerhost:8065";
|
||||||
|
}
|
||||||
|
else {
|
||||||
return "localhost:8065";
|
return "localhost:8065";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return parts[1] + "." + parts[2];
|
return parts[1] + "." + parts[2];
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user