Skip to content

Commit

Permalink
Merge pull request saltstack#43181 from rallytime/deprecate_authorize…
Browse files Browse the repository at this point in the history
…_class

Deprecate Authorize class and any_auth function
  • Loading branch information
Mike Place authored Aug 25, 2017
2 parents 11b97d5 + 62d10b1 commit 8d4cb0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions salt/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import salt.utils
import salt.utils.files
import salt.utils.minions
import salt.utils.versions
import salt.payload

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -410,6 +411,13 @@ class Authorize(object):
The authorization engine used by EAUTH
'''
def __init__(self, opts, load, loadauth=None):
salt.utils.versions.warn_until(
'Neon',
'The \'Authorize\' class has been deprecated. Please use the '
'\'LoadAuth\', \'Reslover\', or \'AuthUser\' classes instead. '
'Support for the \'Authorze\' class will be removed in Salt '
'{version}.'
)
self.opts = salt.config.master_config(opts['conf_file'])
self.load = load
self.ckminions = salt.utils.minions.CkMinions(opts)
Expand Down
7 changes: 7 additions & 0 deletions salt/utils/minions.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,13 @@ def any_auth(self, form, auth_list, fun, arg, tgt=None, tgt_type='glob'):
'''
Read in the form and determine which auth check routine to execute
'''
# This function is only called from salt.auth.Authorize(), which is also
# deprecated and will be removed in Neon.
salt.utils.versions.warn_until(
'Neon',
'The \'any_auth\' function has been deprecated. Support for this '
'function will be removed in Salt {version}.'
)
if form == 'publish':
return self.auth_check(
auth_list,
Expand Down

0 comments on commit 8d4cb0b

Please sign in to comment.