Auth: Fix orgrole picker disabled if isSynced user (#64033)
* fix: disable orgrolepicker if externaluser is synced * add disable to role picker * just took me 2 hours to center the icon * wip * fix: check externallySyncedUser for API call * remove check from store * add: tests * refactor authproxy and made tests run * add: feature toggle * set feature toggle for tests * add: IsProviderEnabled * refactor: featuretoggle name * IsProviderEnabled tests * add specific tests for isProviderEnabled * fix: org_user tests * add: owner to featuretoggle * add missing authlabels * remove fmt * feature toggle * change config * add test for a different authmodule * test refactor * gen feature toggle again * fix basic auth user able to change the org role * test for basic auth role * make err.base to error * lowered lvl of log and input mesg
This commit is contained in:
@@ -47,7 +47,7 @@ func ProvideService(cfg *setting.Cfg) *LDAPImpl {
|
||||
loadingMutex: &sync.Mutex{},
|
||||
}
|
||||
|
||||
if !cfg.LDAPEnabled {
|
||||
if !cfg.LDAPAuthEnabled {
|
||||
return s
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ func ProvideService(cfg *setting.Cfg) *LDAPImpl {
|
||||
}
|
||||
|
||||
func (s *LDAPImpl) ReloadConfig() error {
|
||||
if !s.cfg.LDAPEnabled {
|
||||
if !s.cfg.LDAPAuthEnabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ func (s *LDAPImpl) Config() *ldap.Config {
|
||||
}
|
||||
|
||||
func (s *LDAPImpl) Login(query *login.LoginUserQuery) (*login.ExternalUserInfo, error) {
|
||||
if !s.cfg.LDAPEnabled {
|
||||
if !s.cfg.LDAPAuthEnabled {
|
||||
return nil, ErrLDAPNotEnabled
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func (s *LDAPImpl) Login(query *login.LoginUserQuery) (*login.ExternalUserInfo,
|
||||
}
|
||||
|
||||
func (s *LDAPImpl) User(username string) (*login.ExternalUserInfo, error) {
|
||||
if !s.cfg.LDAPEnabled {
|
||||
if !s.cfg.LDAPAuthEnabled {
|
||||
return nil, ErrLDAPNotEnabled
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user