Bug 1021924 - can't revoke multiple permissions at the same time using bkr policy-revoke
can't revoke multiple permissions at the same time using bkr policy-revoke
Status: CLOSED NOTABUG
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
0.15
Unspecified Unspecified
unspecified Severity high (vote)
: ---
: ---
Assigned To: Dan Callaghan
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-22 06:35 EDT by wangjing
Modified: 2014-11-12 22:43 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-12 22:43:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wangjing 2013-10-22 06:35:45 EDT
Description of problem:
can't revoke all permissions at once via CLI 'bkr policy-grant', only revoke one permission(the last one):

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

How reproducible:
always

Steps to Reproduce:
1. grant all permissions at once:
bkr policy-grant --system=dev-kvm-guest-09.rhts.eng.bos.redhat.com --permission=control_system --permission=edit_policy --permission=edit_system --permission=loan_any --permission=loan_self --permission=reserve --group=xjia --user=tfeng --everybody

2. then revoke all permissions:
bkr policy-revoke --system=dev-kvm-guest-09.rhts.eng.bos.redhat.com --permission=control_system --permission=edit_policy --permission=edit_system --permission=loan_any --permission=loan_self --permission=reserve --group=xjia --user=tfeng --everybody

3. check the result via web

Actual results:
only permission reserve was revoked for the three targets.

Expected results:
all permissions should be revoked for the three targets.

Additional info:
Comment 2 Nick Coghlan 2013-10-24 20:51:34 EDT
Indeed, the logic in the policy-revoke command is not correct - it needs to use the same structure as the policy-grant command.

Both policy-grant and policy-revoke need additional integration tests that cover granting/revoking multiple permissions at once, as well as multiple users and groups in the same command.
Comment 3 Dan Callaghan 2014-11-12 22:43:30 EST
I cannot reproduce this problem.

Here is a pair of test cases which show it working properly as well:

http://gerrit.beaker-project.org/3484

As far as I can see nothing has changed here since 0.15 so I'm not sure what was going wrong...

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