[MM-32281] SqlRoleStore/GetByName: add context to allow read from master (#17176)
* role_store/GetByName: add context * propagate context in the app layer * propagate context in the app layer * add missing import Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9eceeaa8db
Коммит
28ff4dc8d0
@@ -385,7 +385,7 @@ func (a *App) UpdateTeamMemberRoles(teamID string, userID string, newRoles strin
|
||||
|
||||
for _, roleName := range strings.Fields(newRoles) {
|
||||
var role *model.Role
|
||||
role, err = a.GetRoleByName(roleName)
|
||||
role, err = a.GetRoleByName(context.Background(), roleName)
|
||||
if err != nil {
|
||||
err.StatusCode = http.StatusBadRequest
|
||||
return nil, err
|
||||
|
||||
Ссылка в новой задаче
Block a user