mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(keystone): not allow to disable sql driver
not allow to disable default SQL identity_provider driver
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user