#51238 Issue 51228 - Clean up dsidm user status command
Closed 3 years ago by spichugi. Opened 3 years ago by spichugi.
spichugi/389-ds-base i51228  into  master

@@ -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: ?

rebased onto c5b60d6

3 years ago

Pull-Request has been merged by spichugi

3 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/4291

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata