+++ This bug was initially created as a clone of Bug #798803 +++ Description of problem: granted/revoked priveleges are not reflect on queried role views Version-Release number of selected component (if applicable): Current (1.0) How reproducible: very Steps to Reproduce: 1. pulp-admin -u admin -p admin user create --user test --password test 2. pulp-admin -u admin -p admin role create --role test 3. pulp-admin -u admin -p admin role add user --user=test --role=test 4. pulp-admin -u admin -p admin role info --role=test (this should output no permissions) 5. pulp-admin -u admin -p admin permission grant --resource /filters/ --role release -o read 6. pulp-admin -u admin -p admin role info --role=test 7. pulp-admin -u admin -p admin permission revoke --resource /filters/ --role release -o read 6. pulp-admin -u admin -p admin role info --role=test Actual results: step 6 should not output read permissions, but doesn't, I think the mongo query that retrieves the current role permissions DOESN'T return the proper permissions, but the permissions DO still work Expected results: "pulp-admin -u admin -p admin role info --role=test" should output the current working permissions Additional info: --- Additional comment from jconnor on 2012-04-12 16:38:33 EDT --- Following steps 1-6 above, I get the following output on step 6: $ pulp-admin -u admin -p admin role info --role=test +------------------------------------------+ Role Information for test +------------------------------------------+ Name test Users test Permissions: /filters/ READ One thing to note about the instructions above, step 5, the grant is for a role called "resource" where the create and add are for a role called "test" --- Additional comment from jconnor on 2012-04-13 12:04:27 EDT --- Continuing on to step 7 results in: [root@pulp-v1-server ~]# pulp-admin -u admin -p admin permission grant --resource /filters/ --role test -o read Operations ['READ'] granted to role [ test ] on resource [ /filters/ ] [root@pulp-v1-server ~]# pulp-admin -u admin -p admin role info --role=test+------------------------------------------+ Role Information for test +------------------------------------------+ Name test Users test Permissions: /filters/ READ [root@pulp-v1-server ~]# pulp-admin -u admin -p admin permission revoke --resource /filters/ --role test -o read Operations ['READ'] revoked from role [ test ] on resource [ /filters/ ] [root@pulp-v1-server ~]# pulp-admin -u admin -p admin role info --role=test+------------------------------------------+ Role Information for test +------------------------------------------+ Name test Users test Permissions: /filters/ READ --- Additional comment from jconnor on 2012-04-13 12:06:15 EDT --- fix pushed to master in: ef50effdc11f2ee888c0d1ef7a8ff1c707bcaf17 fix pushed to pulp_v1 in: 8d3be26864a6c2b8e58ed3426e59b09cea094930 --- Additional comment from jortel on 2012-04-13 15:05:19 EDT --- build: 0.283
cloning for v2 moving to on_qa as per the comment fix pushed to master in: ef50effdc11f2ee888c0d1ef7a8ff1c707bcaf17
[root@preethi-el6-pulp ~]# rpm -q pulp pulp-0.0.284-1.el6.noarch [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin user create --user test --password test Successfully created user [ test ] with name [ None ] [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role create --role test Role [ test ] created [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role add user --user=test --role=test [ test ] added to role [ test ] [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role info --role=test +------------------------------------------+ Role Information for test +------------------------------------------+ Name test Users test Permissions: [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin permission grant --resource /filters/ --role test -o read Operations ['READ'] granted to role [ test ] on resource [ /filters/ ] [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role info --role=test +------------------------------------------+ Role Information for test +------------------------------------------+ Name test Users test Permissions: /filters/ READ [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin permission revoke --resource /filters/ --role test -o read Operations ['READ'] revoked from role [ test ] on resource [ /filters/ ] [root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role info --role=test +------------------------------------------+ Role Information for test +------------------------------------------+ Name test Users test Permissions:
Pulp v1.1 Release