Migrate store methods to use request.Context instead of context.Context (#24836)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0d5a8b8841
Коммит
13c05a571f
@@ -465,7 +465,7 @@ func createDirectChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
audit.AddEventParameter(auditRec, "user_id", otherUserId)
|
||||
|
||||
canSee, err := c.App.UserCanSeeOtherUser(c.AppContext.Session().UserId, otherUserId)
|
||||
canSee, err := c.App.UserCanSeeOtherUser(c.AppContext, c.AppContext.Session().UserId, otherUserId)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
@@ -546,7 +546,7 @@ func createGroupChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
canSeeAll := true
|
||||
for _, id := range userIds {
|
||||
if c.AppContext.Session().UserId != id {
|
||||
canSee, err := c.App.UserCanSeeOtherUser(c.AppContext.Session().UserId, id)
|
||||
canSee, err := c.App.UserCanSeeOtherUser(c.AppContext, c.AppContext.Session().UserId, id)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
@@ -1110,7 +1110,7 @@ func searchChannelsForTeam(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
channels, appErr = c.App.SearchChannels(c.AppContext, c.Params.TeamId, props.Term)
|
||||
} else {
|
||||
// If the user is not a team member, return a 404
|
||||
if _, appErr = c.App.GetTeamMember(c.Params.TeamId, c.AppContext.Session().UserId); appErr != nil {
|
||||
if _, appErr = c.App.GetTeamMember(c.AppContext, c.Params.TeamId, c.AppContext.Session().UserId); appErr != nil {
|
||||
c.Err = appErr
|
||||
return
|
||||
}
|
||||
@@ -1149,7 +1149,7 @@ func searchArchivedChannelsForTeam(c *Context, w http.ResponseWriter, r *http.Re
|
||||
channels, appErr = c.App.SearchArchivedChannels(c.AppContext, c.Params.TeamId, props.Term, c.AppContext.Session().UserId)
|
||||
} else {
|
||||
// If the user is not a team member, return a 404
|
||||
if _, appErr = c.App.GetTeamMember(c.Params.TeamId, c.AppContext.Session().UserId); appErr != nil {
|
||||
if _, appErr = c.App.GetTeamMember(c.AppContext, c.Params.TeamId, c.AppContext.Session().UserId); appErr != nil {
|
||||
c.Err = appErr
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user