Bug 790140 - Missing warning that no --username or --role was specified when revoking a permission
Summary: Missing warning that no --username or --role was specified when revoking a pe...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jason Connor
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-13 18:25 UTC by John Matthews
Modified: 2014-03-31 01:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:14:00 UTC


Attachments (Terms of Use)

Description John Matthews 2012-02-13 18:25:45 UTC
Description of problem:

When running the permissions revoke command with a missing username no warning is displayed.  The command silently fails.  Would be helpful to display a message stating the required --username or --role is missing

Version-Release number of selected component (if applicable):
pulp-0.0.266-1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a new user
2. Add some permissions to a resource
3. Attempt to remove a permission, but don't specify a username
  
Actual results:
# pulp-admin -u admin -p admin permission revoke --resource '/users/' -o read
<Note nothing is written, this silently does nothing>


Expected results:
# pulp-admin -u admin -p admin permission revoke --resource '/users/' -o read
Usage: pulp-admin <options> permission revoke <options>
...
...


Additional info:

Comment 1 Jason Connor 2012-02-15 14:48:10 UTC
added same check in grant
fix pushed in d390d846521e61a58a911ad7c53f40166a5a5bcc

Comment 2 Jeff Ortel 2012-02-17 17:17:45 UTC
build: 0.267

Comment 3 Preethi Thomas 2012-02-20 15:53:00 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.267-1.fc15.noarch

[root@preethi ~]# pulp-admin permission revoke --resource '/users/' -o read
error:  Either a user or a role is required
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin permission grant  --resource '/users/' -o readerror:  Either a user or a role is required

Comment 4 Preethi Thomas 2012-02-24 20:14:00 UTC
Pulp v1.0 is released
Closed Current Release.


Note You need to log in before you can comment on or make changes to this bug.