diff --git a/app/portainer/oauth/components/oauth-settings/oauth-settings.controller.js b/app/portainer/oauth/components/oauth-settings/oauth-settings.controller.js index 25c7847ea..c61c1c2c0 100644 --- a/app/portainer/oauth/components/oauth-settings/oauth-settings.controller.js +++ b/app/portainer/oauth/components/oauth-settings/oauth-settings.controller.js @@ -72,11 +72,9 @@ export default class OAuthSettingsController { onChangeHideInternalAuth(checked) { this.$scope.$evalAsync(() => { - if (this.featureService.isLimitedToBE(this.limitedFeature)) { - return; + if (!this.isLimitedToBE) { + this.settings.HideInternalAuth = checked; } - - this.settings.HideInternalAuth = checked; }); } diff --git a/app/portainer/settings/authentication/ldap/ad-settings/ad-settings.controller.js b/app/portainer/settings/authentication/ldap/ad-settings/ad-settings.controller.js index 2a372de2f..4c4e844c2 100644 --- a/app/portainer/settings/authentication/ldap/ad-settings/ad-settings.controller.js +++ b/app/portainer/settings/authentication/ldap/ad-settings/ad-settings.controller.js @@ -1,12 +1,12 @@ import _ from 'lodash-es'; import { FeatureId } from '@/portainer/feature-flags/enums'; +import { isLimitedToBE } from '@/portainer/feature-flags/feature-flags.service'; export default class AdSettingsController { /* @ngInject */ - constructor(LDAPService, featureService) { + constructor(LDAPService) { this.LDAPService = LDAPService; - this.featureService = featureService; this.domainSuffix = ''; this.limitedFeatureId = FeatureId.HIDE_INTERNAL_AUTH; @@ -58,7 +58,7 @@ export default class AdSettingsController { } isSaveSettingButtonDisabled() { - return this.featureService.isLimitedToBE(this.limitedFeatureId) || !this.isLdapFormValid(); + return isLimitedToBE(this.limitedFeatureId) || !this.isLdapFormValid(); } $onInit() {