diff options
| author | Olivier Dony <odo@openerp.com> | 2014-07-05 01:04:19 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2014-07-05 01:04:19 +0200 |
| commit | 5ceded9d69b3c261e501500e760b9b345bb77ecc (patch) | |
| tree | de463b8dcfacc82c559381c91ad57f978a48e724 /addons/auth_oauth/controllers/main.py | |
| parent | e19256b062105a8656f0f776b5f9a8bda232cab9 (diff) | |
| parent | 4fa30f556929fb5c11d835f5ef0af68cd8acb6d8 (diff) | |
[MERGE] Forward-port saas-3 up to 4fa30f5
Diffstat (limited to 'addons/auth_oauth/controllers/main.py')
| -rw-r--r-- | addons/auth_oauth/controllers/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index e4d3e18792a..6cf655fa2ca 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -48,7 +48,8 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home): def list_providers(self): try: provider_obj = request.registry.get('auth.oauth.provider') - providers = provider_obj.search_read(request.cr, SUPERUSER_ID, [('enabled', '=', True)]) + providers = provider_obj.search_read(request.cr, SUPERUSER_ID, [('enabled', '=', True), ('auth_endpoint', '!=', False), ('validation_endpoint', '!=', False)]) + # TODO in forwardport: remove conditions on 'auth_endpoint' and 'validation_endpoint' when these fields will be 'required' in model except Exception: providers = [] for provider in providers: |
