[FIX] auth_oauth: hide invalid providers from login screen
This commit is contained in:
parent
451b6b9f3a
commit
1c5058c931
|
@ -46,7 +46,7 @@ class OAuthController(oeweb.Controller):
|
||||||
registry = RegistryManager.get(dbname)
|
registry = RegistryManager.get(dbname)
|
||||||
with registry.cursor() as cr:
|
with registry.cursor() as cr:
|
||||||
providers = registry.get('auth.oauth.provider')
|
providers = registry.get('auth.oauth.provider')
|
||||||
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled', '=', True)]))
|
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled', '=', True), ('auth_endpoint', '!=', False), ('validation_endpoint', '!=', False)]))
|
||||||
except Exception:
|
except Exception:
|
||||||
l = []
|
l = []
|
||||||
return l
|
return l
|
||||||
|
|
Loading…
Reference in New Issue