Bug 790140

Summary: Missing warning that no --username or --role was specified when revoking a permission
Product: [Retired] Pulp Reporter: John Matthews <jmatthew>
Component: user-experienceAssignee: Jason Connor <jconnor>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: mmccune, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-24 20:14:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.