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:
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.
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...