[IMP] auth_oauth: avoid invalid providers
authorRichard Mathot <rim@openerp.com>
Wed, 2 Jul 2014 12:33:36 +0000 (14:33 +0200)
committerRichard Mathot <rim@openerp.com>
Wed, 2 Jul 2014 12:33:36 +0000 (14:33 +0200)
addons/auth_oauth/auth_oauth.py

index 34b6aa4..62e5b03 100644 (file)
@@ -8,15 +8,15 @@ class auth_oauth_provider(osv.osv):
     _order = 'name'
 
     _columns = {
-        'name' : fields.char('Provider name'),               # Name of the OAuth2 entity, Google, LinkedIn, etc
+        'name' : fields.char('Provider name', required=True),               # Name of the OAuth2 entity, Google, LinkedIn, etc
         'client_id' : fields.char('Client ID'),              # Our identifier
-        'auth_endpoint' : fields.char('Authentication URL'), # OAuth provider URL to authenticate users
+        'auth_endpoint' : fields.char('Authentication URL', required=True), # OAuth provider URL to authenticate users
         'scope' : fields.char('Scope'),                                     # OAUth user data desired to access
-        'validation_endpoint' : fields.char('Validation URL'),              # OAuth provider URL to validate tokens
+        'validation_endpoint' : fields.char('Validation URL', required=True),# OAuth provider URL to validate tokens
         'data_endpoint' : fields.char('Data URL'),
         'enabled' : fields.boolean('Allowed'),
         'css_class' : fields.char('CSS class'),
-        'body' : fields.char('Body'),
+        'body' : fields.char('Body', required=True),
         'sequence' : fields.integer(),
     }
     _defaults = {