Auth: Introduce configurable_providers config option for SSO settings (#80911)

* Add SSOSettingsConfigurableProviders config option

* Add check to Delete and ListWithRedactedSecrets

* Add check to GET, small improvements
This commit is contained in:
Misi
2024-01-23 15:48:06 +01:00
committed by GitHub
parent 4148362d63
commit 8246d97587
8 changed files with 75 additions and 49 deletions
+10
View File
@@ -336,6 +336,16 @@ func TestSSOSettingsAPI_GetForProvider(t *testing.T) {
expectedServiceCall: true,
expectedStatusCode: http.StatusInternalServerError,
},
{
desc: "fails with not found error when the provider is not configurable",
key: "grafana_com",
action: "settings:read",
scope: "settings:*",
expectedResult: nil,
expectedError: ssosettings.ErrNotConfigurable,
expectedServiceCall: true,
expectedStatusCode: http.StatusNotFound,
},
}
for _, tt := range tests {