This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.3 in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.3 by this push: new 357d28b Issue 51228 - Clean up dsidm user status command 357d28b is described below
commit 357d28bd2caa57bf8393b9171b03d6d209111a30 Author: Simon Pichugin spichugi@redhat.com AuthorDate: Tue Aug 11 14:43:29 2020 +0200
Issue 51228 - Clean up dsidm user status command
Description: ns-accountstatus.pl, ns-activate.pl and ns-inactivate.pl were ported to lib389 CLI. The functionality was added to dsidm account/role entry-status, dsidm account subtree-status, dsidm role lock/unlock, dsidm account lock/unlock.
Remove dsidm user status/lock/unlock commands as they are redundant.
https://pagure.io/389-ds-base/issue/50206 https://pagure.io/389-ds-base/issue/51228
Reviewed by: mreynolds (Thanks!) --- src/lib389/lib389/cli_idm/user.py | 35 ----------------------------------- 1 file changed, 35 deletions(-)
diff --git a/src/lib389/lib389/cli_idm/user.py b/src/lib389/lib389/cli_idm/user.py index a014541..426570a 100644 --- a/src/lib389/lib389/cli_idm/user.py +++ b/src/lib389/lib389/cli_idm/user.py @@ -50,28 +50,6 @@ def modify(inst, basedn, log, args, warn=True): rdn = _get_arg( args.selector, msg="Enter %s to retrieve" % RDN) _generic_modify(inst, basedn, log.getChild('_generic_modify'), MANY, rdn, args)
-def status(inst, basedn, log, args): - uid = _get_arg( args.uid, msg="Enter %s to check" % RDN) - uas = MANY(inst, basedn) - acct = uas.get(uid) - acct_str = "locked: %s" % acct.is_locked() - log.info('uid: %s' % uid) - log.info(acct_str) - -def lock(inst, basedn, log, args): - uid = _get_arg( args.uid, msg="Enter %s to check" % RDN) - accounts = MANY(inst, basedn) - acct = accounts.get(uid) - acct.lock() - log.info('locked %s' % uid) - -def unlock(inst, basedn, log, args): - uid = _get_arg( args.uid, msg="Enter %s to check" % RDN) - accounts = MANY(inst, basedn) - acct = accounts.get(uid) - acct.unlock() - log.info('unlocked %s' % uid) - def create_parser(subparsers): user_parser = subparsers.add_parser('user', help='Manage posix users')
@@ -101,17 +79,4 @@ def create_parser(subparsers): delete_parser.set_defaults(func=delete) delete_parser.add_argument('dn', nargs='?', help='The dn to delete')
- lock_parser = subcommands.add_parser('lock', help='lock') - lock_parser.set_defaults(func=lock) - lock_parser.add_argument('uid', nargs='?', help='The uid to lock') - - status_parser = subcommands.add_parser('status', help='status') - status_parser.set_defaults(func=status) - status_parser.add_argument('uid', nargs='?', help='The uid to check') - - unlock_parser = subcommands.add_parser('unlock', help='unlock') - unlock_parser.set_defaults(func=unlock) - unlock_parser.add_argument('uid', nargs='?', help='The uid to unlock') - - # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
389-commits@lists.fedoraproject.org