mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
update the publish method to use the new structure that is being passed in
This commit is contained in:
parent
5616b0fb57
commit
93d87db1a5
@ -1371,19 +1371,20 @@ class ClearFuncs(object):
|
||||
This method sends out publications to the minions, it can only be used
|
||||
by the LocalClient.
|
||||
'''
|
||||
extra = clear_load.get('extra', {})
|
||||
# Check for external auth calls
|
||||
if 'eauth' in clear_load:
|
||||
if not clear_load['eauth'] in self.opts['external_auth']:
|
||||
if 'eauth' in extra:
|
||||
if not extra['eauth'] in self.opts['external_auth']:
|
||||
# The eauth system is not enabled, fail
|
||||
return ''
|
||||
name = self.auth.load_name(clear_load)
|
||||
if not name in self.opts['external_auth'][clear_load['eauth']]:
|
||||
name = self.auth.load_name(extra)
|
||||
if not name in self.opts['external_auth'][extra['eauth']]:
|
||||
return ''
|
||||
if not self.auth.time_auth(load):
|
||||
if not self.auth.time_auth(extra):
|
||||
return ''
|
||||
good = False
|
||||
for regex in self.opts['external_auth'][clear_load['eauth']][name]:
|
||||
if re.match(regex, clear_load['fun']):
|
||||
for regex in self.opts['external_auth'][extra['eauth']][name]:
|
||||
if re.match(regex, extra['fun']):
|
||||
good = True
|
||||
if not good:
|
||||
return ''
|
||||
|
Loading…
Reference in New Issue
Block a user