Browse Source

Change incorrect default policy role

Change-Id: I194164425416e5905e2234e76014e32f276fde76
Adrian Czarnecki 7 months ago
parent
commit
dc9e276f10

+ 1
- 1
monasca_events_api/policies/agent.py View File

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

+ 5
- 5
monasca_events_api/tests/unit/test_events_v1.py View File

@@ -49,7 +49,7 @@ class TestEventsApi(base.BaseApiTestCase):
49 49
             method='POST',
50 50
             headers={
51 51
                 'Content-Type': 'application/json',
52
-                'X_ROLES': 'monasca'
52
+                'X_ROLES': 'monasca-user'
53 53
             },
54 54
             body=body
55 55
         )
@@ -69,7 +69,7 @@ class TestEventsApi(base.BaseApiTestCase):
69 69
             method='POST',
70 70
             headers={
71 71
                 'Content-Type': 'application/json',
72
-                'X_ROLES': 'monasca'
72
+                'X_ROLES': 'monasca-user'
73 73
             },
74 74
             body=body
75 75
         )
@@ -83,7 +83,7 @@ class TestEventsApi(base.BaseApiTestCase):
83 83
             method='POST',
84 84
             headers={
85 85
                 'Content-Type': 'application/json',
86
-                'X_ROLES': 'monasca'
86
+                'X_ROLES': 'monasca-user'
87 87
             },
88 88
             body=''
89 89
         )
@@ -104,7 +104,7 @@ class TestEventsApi(base.BaseApiTestCase):
104 104
             method='POST',
105 105
             headers={
106 106
                 'Content-Type': 'application/json',
107
-                'X_ROLES': 'monasca'
107
+                'X_ROLES': 'monasca-user'
108 108
             },
109 109
             body=json.dumps(body)
110 110
         )
@@ -119,7 +119,7 @@ class TestEventsApi(base.BaseApiTestCase):
119 119
             method='POST',
120 120
             headers={
121 121
                 'Content-Type': 'application/json',
122
-                'X_ROLES': 'monasca'
122
+                'X_ROLES': 'monasca-user'
123 123
             },
124 124
             body=json.dumps(body)
125 125
         )

Loading…
Cancel
Save