Change incorrect default policy role

Change-Id: I194164425416e5905e2234e76014e32f276fde76
This commit is contained in:
Adrian Czarnecki 2018-09-06 14:34:07 +02:00
parent 8e84984c74
commit dc9e276f10
2 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@ from oslo_policy import policy
agent_policies = [ agent_policies = [
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
name='events_api:agent_required', name='events_api:agent_required',
check_str='role:monasca or role:admin', check_str='role:monasca-user or role:admin',
description='Send events to api', description='Send events to api',
operations=[{'path': '/v1.0/events', 'method': 'POST'}] operations=[{'path': '/v1.0/events', 'method': 'POST'}]
) )

View File

@ -49,7 +49,7 @@ class TestEventsApi(base.BaseApiTestCase):
method='POST', method='POST',
headers={ headers={
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X_ROLES': 'monasca' 'X_ROLES': 'monasca-user'
}, },
body=body body=body
) )
@ -69,7 +69,7 @@ class TestEventsApi(base.BaseApiTestCase):
method='POST', method='POST',
headers={ headers={
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X_ROLES': 'monasca' 'X_ROLES': 'monasca-user'
}, },
body=body body=body
) )
@ -83,7 +83,7 @@ class TestEventsApi(base.BaseApiTestCase):
method='POST', method='POST',
headers={ headers={
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X_ROLES': 'monasca' 'X_ROLES': 'monasca-user'
}, },
body='' body=''
) )
@ -104,7 +104,7 @@ class TestEventsApi(base.BaseApiTestCase):
method='POST', method='POST',
headers={ headers={
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X_ROLES': 'monasca' 'X_ROLES': 'monasca-user'
}, },
body=json.dumps(body) body=json.dumps(body)
) )
@ -119,7 +119,7 @@ class TestEventsApi(base.BaseApiTestCase):
method='POST', method='POST',
headers={ headers={
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X_ROLES': 'monasca' 'X_ROLES': 'monasca-user'
}, },
body=json.dumps(body) body=json.dumps(body)
) )