'As admin role, create an image with a protected property, and verify
permitted role \'member\' can read that protected property via
/images/detail'

def test_prop_protection_with_detail_and_permitted_role(self):

    self._create_admin_image({'x-image-meta-property-x_owner_foo': 'bar'})
    another_request = unit_test_utils.get_fake_request(method='GET', path='/images/detail')
    headers = {'x-auth-token': 'user:tenant:member'}
    for (k, v) in six.iteritems(headers):
        another_request.headers[k] = v
    output = another_request.get_response(self.api)
    self.assertEqual(http_client.OK, output.status_int)
    res_body = jsonutils.loads(output.body)['images'][0]
    self.assertEqual('bar', res_body['properties']['x_owner_foo'])
