Merge pull request #9140 from swordqiu/hotfix/qj-not-allow-disable-sql-driver

fix(keystone): not allow to disable sql driver
This commit is contained in:
Zexi Li
2020-12-02 17:08:27 +08:00
committed by GitHub
+3
View File
@@ -1481,6 +1481,9 @@ func (idp *SIdentityProvider) PerformDisable(
query jsonutils.JSONObject,
input apis.PerformDisableInput,
) (jsonutils.JSONObject, error) {
if idp.Driver == api.IdentityDriverSQL {
return nil, errors.Wrap(httperrors.ErrForbidden, "not allow to disable sql idp")
}
if idp.Driver == api.IdentityDriverLDAP || idp.AutoCreateUser.IsTrue() {
domains, _ := idp.getLinkedDomains()
for i := range domains {