Этот коммит содержится в:
Tim Scheuermann
2022-08-18 11:01:37 +02:00
коммит произвёл GitHub
родитель 8e0d46e0c6
Коммит a28a967eba
92 изменённых файлов: 1681 добавлений и 1677 удалений

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

@@ -204,7 +204,7 @@ func (a *App) deleteGroupConstrainedChannelMemberships(c request.CTX, channelID
func (a *App) SyncSyncableRoles(syncableID string, syncableType model.GroupSyncableType) *model.AppError {
permittedAdmins, err := a.Srv().Store.Group().PermittedSyncableAdmins(syncableID, syncableType)
if err != nil {
return model.NewAppError("SyncSyncableRoles", "app.select_error", nil, err.Error(), http.StatusInternalServerError)
return model.NewAppError("SyncSyncableRoles", "app.select_error", nil, "", http.StatusInternalServerError).Wrap(err)
}
a.Log().Info(
@@ -217,13 +217,13 @@ func (a *App) SyncSyncableRoles(syncableID string, syncableType model.GroupSynca
case model.GroupSyncableTypeTeam:
nErr := a.Srv().Store.Team().UpdateMembersRole(syncableID, permittedAdmins)
if nErr != nil {
return model.NewAppError("App.SyncSyncableRoles", "app.update_error", nil, nErr.Error(), http.StatusInternalServerError)
return model.NewAppError("App.SyncSyncableRoles", "app.update_error", nil, "", http.StatusInternalServerError).Wrap(nErr)
}
return nil
case model.GroupSyncableTypeChannel:
nErr := a.Srv().Store.Channel().UpdateMembersRole(syncableID, permittedAdmins)
if nErr != nil {
return model.NewAppError("App.SyncSyncableRoles", "app.update_error", nil, nErr.Error(), http.StatusInternalServerError)
return model.NewAppError("App.SyncSyncableRoles", "app.update_error", nil, "", http.StatusInternalServerError).Wrap(nErr)
}
return nil
default: