Bug 1021924 - can't revoke multiple permissions at the same time using bkr policy-revoke
Summary: can't revoke multiple permissions at the same time using bkr policy-revoke
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.15
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-22 10:35 UTC by wangjing
Modified: 2018-02-06 00:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-13 03:43:30 UTC
Embargoed:


Attachments (Terms of Use)

Description wangjing 2013-10-22 10:35:45 UTC
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-25 00:51:34 UTC
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-13 03:43:30 UTC
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.