Bug 1014899

Summary: Command line support for filtering policy rules by user(s), group(s), self
Product: [Retired] Beaker Reporter: Amit Saha <asaha>
Component: command lineAssignee: Amit Saha <asaha>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: developCC: aigao, asaha, dcallagh, ebaak, llim, qwan, rmancy, xjia
Target Milestone: 0.15.2Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-19 07:04:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1011378    
Bug Blocks: 1039478    

Description Amit Saha 2013-10-03 04:46:52 UTC
Description of problem:

BZ#1011378 adds the support for retrieving access policy rules for a system. It will also be useful to be able to retrieve the policies for particular user(s), group(s)  and the user himself/herself.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:

List my access rules for system test1.example.com:

$ bkr policy-list test1.example.com --mine

List a user's access rules for system test1.example.com:

$ bkr policy-list test1.example.com --user <username>

List a group's access rules for system test1.example.com:

$ bkr policy-list test1.example.com --group <groupname>


Additional info:

All three should be accessible to any authenticated user?

Comment 2 Amit Saha 2013-12-02 01:39:43 UTC
On gerrit: http://gerrit.beaker-project.org/#/c/2573/1

Comment 4 Nick Coghlan 2013-12-09 07:15:32 UTC
The updated documentation for this change is available at:

http://beaker-project.org/docs-release-0.15/man/

Comment 5 Amit Saha 2013-12-09 08:08:04 UTC
For the  --mine filter, it should check if the user is authenticated. Currently this is not the case and results in:

"AttributeError: 'NoneType' object has no attribute 'user_name'"

Comment 6 Amit Saha 2013-12-09 08:31:48 UTC
On gerrit: http://gerrit.beaker-project.org/#/c/2603/1

Comment 7 xjia 2013-12-09 09:06:04 UTC
(In reply to Amit Saha from comment #5)
Have opened a bug for it : 
https://bugzilla.redhat.com/show_bug.cgi?id=1039478

Comment 8 Amit Saha 2013-12-10 00:59:31 UTC
*** Bug 1039478 has been marked as a duplicate of this bug. ***