Disable external auth sources for now

This commit is contained in:
Thomas S Hatch 2013-11-14 15:28:38 -07:00
parent 393655a943
commit 16fdb8819f

View File

@ -165,11 +165,11 @@ class Authorize(object):
'''
Gather and create the autorization data sets
'''
auth_data = [self.opts['external_auth']]
for auth_back in self.opts.get('external_auth_sources', []):
fstr = '{0}.perms'.format(auth_back)
if fstr in self.loadauth.auth:
auth_data.append(getattr(self.loadauth.auth)())
auth_data = self.opts['external_auth']
#for auth_back in self.opts.get('external_auth_sources', []):
# fstr = '{0}.perms'.format(auth_back)
# if fstr in self.loadauth.auth:
# auth_data.append(getattr(self.loadauth.auth)())
return auth_data
def token(self, adata, load):
@ -189,8 +189,9 @@ class Authorize(object):
log.warning('Authentication failure of type "token" occurred.')
yield {}
for sub_auth in adata:
if token['eauth'] not in adata:
continue
for sub_adata in adata:
if token['eauth'] not in adata:
continue
if not ((token['name'] in adata[token['eauth']]) |
('*' in adata[token['eauth']])):
continue
@ -251,7 +252,7 @@ class Authorize(object):
if sub_auth:
if self.rights_check(
form,
sub_auth['sub_auth'],
adata[sub_auth['token']['eauth']],
sub_auth['token']['name'],
load,
sub_auth['token']['eauth']):