| |
@@ -50,28 +50,6 @@
|
| |
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 @@
|
| |
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
|
| |
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: ?