)]}'
{
  "commit": "fa01d5f4e8a151b582397b17688505a8f0ac71d9",
  "tree": "69a8b9b28735570fbe551bec047c2caa8bbfd53a",
  "parents": [
    "934acae7a18fd7e368421319723333b5a30420b6"
  ],
  "author": {
    "name": "Felipe Monteiro",
    "email": "felipe.monteiro@att.com",
    "time": "Sat Apr 01 06:18:25 2017 +0100"
  },
  "committer": {
    "name": "Felipe Monteiro",
    "email": "felipe.monteiro@att.com",
    "time": "Tue Apr 04 18:02:26 2017 +0100"
  },
  "message": "Add role-switching validation to Patrole framework.\n\nCurrently, no role validation is performed when calling switch_role. This\nis problematic for the following reasons:\n  - The only \"validation\" right now checks whether switchToRbacRole is None.\n    If so, None is returned. The validation used is nowhere near as robust\n    as it should be -- what if a string or int is passed in? -- and an error\n    should be thrown instead of silently returning None.\n  - If switch_role is called with the same boolean value twice, then the\n    rbac_role under test is never switched to: this should be detected\n    and flagged as an error.\n  - If switch_role is not called in a test, then an error should definitely\n    be thrown as well, because then the test may pass as a false positive.\n\nThis patch adds role validation so that the above cases are avoided.\n\nThis patch also updated unit tests and added additional ones\nwhere needed.\n\nImplements: blueprint add-switch-role-validation\nChange-Id: Ida0f03af236eb0f91d8cc96d51ca57671b4eef7c\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "db648dfbec42421fe2f178db82a99b1634937b7d",
      "old_mode": 33188,
      "old_path": "patrole_tempest_plugin/rbac_utils.py",
      "new_id": "f61ccdfec208f3ec5bfbe6ebcd469ea969330141",
      "new_mode": 33188,
      "new_path": "patrole_tempest_plugin/rbac_utils.py"
    },
    {
      "type": "modify",
      "old_id": "7d99d5516cd2d28078ab418d0729a368c0b9fdfe",
      "old_mode": 33188,
      "old_path": "patrole_tempest_plugin/tests/api/image/v2/test_images_member_rbac.py",
      "new_id": "c53480d32fa26b6ad50cba205dbc0b0f409842e7",
      "new_mode": 33188,
      "new_path": "patrole_tempest_plugin/tests/api/image/v2/test_images_member_rbac.py"
    },
    {
      "type": "modify",
      "old_id": "add1770e1269b86c8d0e95132e0bffca80f36a60",
      "old_mode": 33188,
      "old_path": "patrole_tempest_plugin/tests/unit/test_rbac_utils.py",
      "new_id": "692c0b98d902e9507b719e6a23246ef3d2d8036e",
      "new_mode": 33188,
      "new_path": "patrole_tempest_plugin/tests/unit/test_rbac_utils.py"
    }
  ]
}
