Description of problem: Adding the role to user mulitple time for same role and user. for example:- oadm policy add-role-to-user view user1 role "view" added: "user1" oadm policy add-role-to-user view user1 role "view" added: "user1" Version-Release number of selected component (if applicable): atomic-openshift-utils-3.6.173.0.48-1.git.0.1609d30.el7.noarch How reproducible: Execution of command through CLI Steps to Reproduce: 1.Login to openshift 2.oadm policy add-role-to-user view user1 Actual results: It is successfully adding same role to group. Expected results: It should verify that the particular role is added to the user. If the role is added again to same user , it must throw an error. Additional info:
I do not think this is something we want to do. In general we prefer idempotency, so that if the result of the requested action is obtained we do not error, even if nothing was doen to obtain it. This make declarative configuration (think Ansible) much easier as the result of operation (errors) depends on whether the desired outcome is achieved, and not how it is achieved.