CI: Bump golangci-lint to 2.0.2 (#103572)
This commit is contained in:
@@ -471,7 +471,7 @@ func (s *Service) getPlugins(ctx context.Context, signedInUser *user.SignedInUse
|
||||
ac.EvalPermission(datasources.ActionCreate),
|
||||
ac.EvalPermission(pluginaccesscontrol.ActionInstall),
|
||||
))
|
||||
if !(userIsOrgAdmin || hasAccess) {
|
||||
if !userIsOrgAdmin && !hasAccess {
|
||||
s.log.Info("user is not allowed to list non-core plugins", "UID", signedInUser.UserUID)
|
||||
return results, nil
|
||||
}
|
||||
@@ -498,7 +498,7 @@ func (s *Service) getPlugins(ctx context.Context, signedInUser *user.SignedInUse
|
||||
}
|
||||
|
||||
pluginSettingCmd := pluginsettings.UpdatePluginSettingCmd{
|
||||
Enabled: plugin.JSONData.AutoEnabled,
|
||||
Enabled: plugin.AutoEnabled,
|
||||
Pinned: plugin.Pinned,
|
||||
PluginVersion: plugin.Info.Version,
|
||||
PluginId: plugin.ID,
|
||||
|
||||
@@ -361,9 +361,12 @@ func (ss *sqlStore) UpdateSnapshotResources(ctx context.Context, snapshotUid str
|
||||
errorIds := make(map[errId][]any)
|
||||
|
||||
for _, r := range resources {
|
||||
if r.Status == cloudmigration.ItemStatusOK {
|
||||
switch r.Status {
|
||||
case cloudmigration.ItemStatusPending:
|
||||
// Do nothing. A pending item should not be updated, as it is still in progress.
|
||||
case cloudmigration.ItemStatusOK:
|
||||
okIds = append(okIds, r.RefID)
|
||||
} else if r.Status == cloudmigration.ItemStatusError {
|
||||
case cloudmigration.ItemStatusError:
|
||||
key := errId{errCode: r.ErrorCode, errStr: r.Error}
|
||||
if ids, ok := errorIds[key]; ok {
|
||||
errorIds[key] = append(ids, r.RefID)
|
||||
|
||||
Reference in New Issue
Block a user