mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +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
|
This method sends out publications to the minions, it can only be used
|
||||||
by the LocalClient.
|
by the LocalClient.
|
||||||
'''
|
'''
|
||||||
|
extra = clear_load.get('extra', {})
|
||||||
# Check for external auth calls
|
# Check for external auth calls
|
||||||
if 'eauth' in clear_load:
|
if 'eauth' in extra:
|
||||||
if not clear_load['eauth'] in self.opts['external_auth']:
|
if not extra['eauth'] in self.opts['external_auth']:
|
||||||
# The eauth system is not enabled, fail
|
# The eauth system is not enabled, fail
|
||||||
return ''
|
return ''
|
||||||
name = self.auth.load_name(clear_load)
|
name = self.auth.load_name(extra)
|
||||||
if not name in self.opts['external_auth'][clear_load['eauth']]:
|
if not name in self.opts['external_auth'][extra['eauth']]:
|
||||||
return ''
|
return ''
|
||||||
if not self.auth.time_auth(load):
|
if not self.auth.time_auth(extra):
|
||||||
return ''
|
return ''
|
||||||
good = False
|
good = False
|
||||||
for regex in self.opts['external_auth'][clear_load['eauth']][name]:
|
for regex in self.opts['external_auth'][extra['eauth']][name]:
|
||||||
if re.match(regex, clear_load['fun']):
|
if re.match(regex, extra['fun']):
|
||||||
good = True
|
good = True
|
||||||
if not good:
|
if not good:
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
Reference in New Issue
Block a user