Plugins: Add secure JSON fields to plugin setting DTO (#55313)
* add secure JSON fields to plugin setting DTO * add nil pointer fix * adding secureJsonFields to the plugin meta. Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
This commit is contained in:
co-authored by
Marcus Andersson
parent
c10a69c007
commit
b25ea75bac
@@ -397,9 +397,21 @@ type pluginsSettingsServiceMock struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func (s *pluginsSettingsServiceMock) GetPluginSettings(_ context.Context, args *pluginsettings.GetArgs) ([]*pluginsettings.DTO, error) {
|
||||
func (s *pluginsSettingsServiceMock) GetPluginSettings(_ context.Context, args *pluginsettings.GetArgs) ([]*pluginsettings.InfoDTO, error) {
|
||||
s.getPluginSettingsArgs = append(s.getPluginSettingsArgs, args.OrgID)
|
||||
return s.storedPluginSettings, s.err
|
||||
|
||||
var res []*pluginsettings.InfoDTO
|
||||
for _, ps := range s.storedPluginSettings {
|
||||
res = append(res, &pluginsettings.InfoDTO{
|
||||
PluginID: ps.PluginID,
|
||||
OrgID: ps.OrgID,
|
||||
Enabled: ps.Enabled,
|
||||
Pinned: ps.Pinned,
|
||||
PluginVersion: ps.PluginVersion,
|
||||
})
|
||||
}
|
||||
|
||||
return res, s.err
|
||||
}
|
||||
|
||||
func (s *pluginsSettingsServiceMock) GetPluginSettingByPluginID(_ context.Context, args *pluginsettings.GetByPluginIDArgs) (*pluginsettings.DTO, error) {
|
||||
|
||||
Reference in New Issue
Block a user