Merge branch 'advanced-permissions-phase-2' of github.com:mattermost/mattermost-server into advanced-permissions-phase-2

Этот коммит содержится в:
Martin Kraft
2018-05-01 19:00:15 -04:00
родитель ff6c42309c aa42ed8aba
Коммит d2cc0c5834
3 изменённых файлов: 6 добавлений и 6 удалений

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

@@ -388,8 +388,8 @@ func (a *App) JoinUserToTeam(team *model.Team, user *model.User, userRequestorId
shouldBeAdmin := team.Email == user.Email shouldBeAdmin := team.Email == user.Email
// Soft error if there is an issue joining the default channels // Soft error if there is an issue joining the default channels
if err := a.JoinDefaultChannels(team.Id, user, channelRole, userRequestorId); err != nil { if err := a.JoinDefaultChannels(team.Id, user, shouldBeAdmin, 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)) 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) a.ClearSessionCacheForUser(user.Id)

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

@@ -91,7 +91,7 @@ func (s *RedisSupplier) RoleDelete(ctx context.Context, roleId string, hints ...
key := buildRedisKeyForRoleName(role.Name) key := buildRedisKeyForRoleName(role.Name)
if err := s.client.Del(key).Err(); err != nil { 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())
} }
} }

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

@@ -504,7 +504,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
if ss.DriverName() == model.DATABASE_DRIVER_POSTGRES { if ss.DriverName() == model.DATABASE_DRIVER_POSTGRES {
_, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + postgresColType) _, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + postgresColType)
if err != nil { 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) time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_POSTGRES) 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 { } else if ss.DriverName() == model.DATABASE_DRIVER_MYSQL {
_, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + mySqlColType) _, err := ss.GetMaster().ExecNoTimeout("ALTER TABLE " + tableName + " ADD " + columnName + " " + mySqlColType)
if err != nil { 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) time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_MYSQL) os.Exit(EXIT_CREATE_COLUMN_MYSQL)
} }
@@ -522,7 +522,7 @@ func (ss *SqlSupplier) CreateColumnIfNotExistsNoDefault(tableName string, column
return true return true
} else { } 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) time.Sleep(time.Second)
os.Exit(EXIT_CREATE_COLUMN_MISSING) os.Exit(EXIT_CREATE_COLUMN_MISSING)
return false return false