Merge branch 'master' into advanced-permissions-phase-1
Этот коммит содержится в:
@@ -10,6 +10,7 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -870,7 +871,7 @@ func TestGetInfoForFilename(t *testing.T) {
|
||||
|
||||
func readTestFile(name string) ([]byte, error) {
|
||||
path, _ := utils.FindDir("tests")
|
||||
file, err := os.Open(path + "/" + name)
|
||||
file, err := os.Open(filepath.Join(path, name))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -1170,7 +1170,11 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
teamId := relayProps["team_id"]
|
||||
if len(teamId) > 0 {
|
||||
c.App.Go(func() {
|
||||
c.App.AddDirectChannels(teamId, user)
|
||||
if err := c.App.AddUserToTeamByTeamId(teamId, user); err != nil {
|
||||
l4g.Error(err.Error())
|
||||
} else {
|
||||
c.App.AddDirectChannels(teamId, user)
|
||||
}
|
||||
})
|
||||
}
|
||||
case model.OAUTH_ACTION_EMAIL_TO_SSO:
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -778,7 +779,7 @@ func TestUserUploadProfileImage(t *testing.T) {
|
||||
}
|
||||
|
||||
path, _ := utils.FindDir("tests")
|
||||
file, err := os.Open(path + "/test.png")
|
||||
file, err := os.Open(filepath.Join(path, "test.png"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user