You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/02/28 10:51:09 UTC
[GitHub] markusthoemmes commented on a change in pull request #3348: Allow wskadmin user block/unblock to accept a list of subject to block
markusthoemmes commented on a change in pull request #3348: Allow wskadmin user block/unblock to accept a list of subject to block
URL: https://github.com/apache/incubator-openwhisk/pull/3348#discussion_r171206809
##########
File path: tools/admin/wskadmin
##########
@@ -108,11 +108,11 @@ def parseArgs():
subcmd = subparser.add_parser('whois', help='identify user from an authorization key')
subcmd.add_argument('authkey', help='the credentials to look up')
- subcmd = subparser.add_parser('block', help='block a user')
- subcmd.add_argument('subject', help='the user to block')
+ subcmd = subparser.add_parser('block', help='block one or more users')
+ subcmd.add_argument('subject', help='comma separated list of users to block')
Review comment:
Should this be
```python
subcmd.add_argument('subjects', nargs='+', help='comma separated list of users to block')
```
That would make the following command possible:
```
$ wskadmin user block subject1 subject2 subject3
```
which is more in line with bash standards I think. it also makes the "manual" splitting unnecessary (`args.subjects` will be a list already) and it'll force the user to give at least one subject.
WDYT?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services