summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kraft <martinkraft@gmail.com>2018-05-01 19:00:15 -0400
committerMartin Kraft <martinkraft@gmail.com>2018-05-01 19:00:15 -0400
commitd2cc0c5834d6849f2fdb1e343ed5e193b742fa2f (patch)
treeb3add5519af5272451b391643e68b76858aa9aff
parentff6c42309c4dd328b5841cfeef6b59ea59a4379c (diff)
parentaa42ed8abae72ade1cb193027b06e6f19b579ddf (diff)
downloadchat-d2cc0c5834d6849f2fdb1e343ed5e193b742fa2f.tar.gz
chat-d2cc0c5834d6849f2fdb1e343ed5e193b742fa2f.tar.bz2
chat-d2cc0c5834d6849f2fdb1e343ed5e193b742fa2f.zip
Merge branch 'advanced-permissions-phase-2' of github.com:mattermost/mattermost-server into advanced-permissions-phase-2
-rw-r--r--app/team.go4
-rw-r--r--store/redis_supplier_roles.go2
-rw-r--r--store/sqlstore/supplier.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/app/team.go b/app/team.go
index 936c06868..4fc410934 100644
--- a/app/team.go
+++ b/app/team.go
@@ -388,8 +388,8 @@ func (a *App) JoinUserToTeam(team *model.Team, user *model.User, userRequestorId
shouldBeAdmin := team.Email == user.Email
// Soft error if there is an issue joining the default channels
- if err := a.JoinDefaultChannels(team.Id, user, channelRole, userRequestorId); err != nil {
- mlog.Error(fmt.Sprintf("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", user.Id, team.Id, err), mlog.String("user_id", user.Id))
+ if err := a.JoinDefaultChannels(team.Id, user, shouldBeAdmin, userRequestorId); err != nil {
+ mlog.Error(fmt.Sprintf("Encountered an issue joining default channels err=%v", err), mlog.String("user_id", user.Id), mlog.String("team_id", team.Id))
}
a.ClearSessionCacheForUser(user.Id)
diff --git a/store/redis_supplier_roles.go b/store/redis_supplier_roles.go
index ec4142273..49f8ede48 100644
--- a/store/redis_supplier_roles.go
+++ b/store/redis_supplier_roles.go
@@ -91,7 +91,7 @@ func (s *RedisSupplier) RoleDelete(ctx context.Context, roleId string, hints ...
key := buildRedisKeyForRoleName(role.Name)
if err := s.client.Del(key).Err(); err != nil {
- l4g.Error("Redis failed to remove key " + key + " Error: " + err.Error())
+ mlog.Error("Redis failed to remove key " + key + " Error: " + err.Error())
}
}
diff --git a/store/sqlstore/supplier.go b/store/sqlstore/supplier.go
index d36a55097..02a3cef7f 100644
--- a/store/sqlstore/supplier.go
+++ b/store/sqlstore/supplier.go
@@ -504,7 +504,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
if ss.DriverName() == model.DATABASE_DRIVER_POSTGRES {
_, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + postgresColType)
if err != nil {
- l4g.Critical(utils.T("store.sql.create_column.critical"), err)
+ mlog.Critical(fmt.Sprintf("Failed to create column %v", err))
time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_POSTGRES)
}
@@ -514,7 +514,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
} else if ss.DriverName() == model.DATABASE_DRIVER_MYSQL {
_, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + mySqlColType)
if err != nil {
- l4g.Critical(utils.T("store.sql.create_column.critical"), err)
+ mlog.Critical(fmt.Sprintf("Failed to create column %v", err))
time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_MYSQL)
}
@@ -522,7 +522,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
return true
} else {
- l4g.Critical(utils.T("store.sql.create_column_missing_driver.critical"))
+ mlog.Critical("Failed to create column because of missing driver")
time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_MISSING)
return false