Tuesday, August 11, 2020

[389-commits] [389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51228 - Clean up dsidm user status command

This is an automated email from the git hooks/post-receive script.

spichugi pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.

The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 674dc76 Issue 51228 - Clean up dsidm user status command
674dc76 is described below

commit 674dc76bf82c19cea69451025da43c7a3eb50de2
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

--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
389-commits mailing list -- 389-commits@lists.fedoraproject.org
To unsubscribe send an email to 389-commits-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-commits@lists.fedoraproject.org

No comments:

Post a Comment