[FIX] auth_oauth: hide invalid providers from login screen

This commit is contained in:
Richard Mathot 2014-07-02 14:07:52 +02:00
parent 451b6b9f3a
commit 1c5058c931
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class OAuthController(oeweb.Controller):
registry = RegistryManager.get(dbname)
with registry.cursor() as cr:
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:
l = []
return l