"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "barbican/common/policies/orders.py" between
barbican-11.0.0.tar.gz and barbican-12.0.0.tar.gz

About: OpenStack Barbican is the OpenStack Key Manager service. It provides secure storage, provisioning and management of secret data.
The "Wallaby" series (latest release).

orders.py  (barbican-11.0.0):orders.py  (barbican-12.0.0)
skipping to change at line 15 skipping to change at line 15
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from oslo_policy import policy from oslo_policy import policy
_MEMBER = "role:member"
rules = [ rules = [
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
name='orders:get', name='orders:get',
check_str='rule:all_but_audit', check_str=f'rule:all_but_audit or {_MEMBER}',
scope_types=[], scope_types=['project'],
description='Gets list of all orders associated with a project.', description='Gets list of all orders associated with a project.',
operations=[ operations=[
{ {
'path': '/v1/orders', 'path': '/v1/orders',
'method': 'GET' 'method': 'GET'
} }
] ]
), ),
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
name='orders:post', name='orders:post',
check_str='rule:admin_or_creator', check_str=f'rule:admin_or_creator or {_MEMBER}',
scope_types=[], scope_types=['project'],
description='Creates an order.', description='Creates an order.',
operations=[ operations=[
{ {
'path': '/v1/orders', 'path': '/v1/orders',
'method': 'POST' 'method': 'POST'
} }
] ]
), ),
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
name='orders:put', name='orders:put',
check_str='rule:admin_or_creator', check_str=f'rule:admin_or_creator or {_MEMBER}',
scope_types=[], scope_types=['project'],
description='Unsupported method for the orders API.', description='Unsupported method for the orders API.',
operations=[ operations=[
{ {
'path': '/v1/orders', 'path': '/v1/orders',
'method': 'PUT' 'method': 'PUT'
} }
] ]
), ),
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
name='order:get', name='order:get',
check_str='rule:all_users', check_str=f'rule:all_users or {_MEMBER}',
scope_types=[], scope_types=['project'],
description='Retrieves an orders metadata.', description='Retrieves an orders metadata.',
operations=[ operations=[
{ {
'path': '/v1/orders/{order-id}', 'path': '/v1/orders/{order-id}',
'method': 'GET' 'method': 'GET'
} }
] ]
), ),
policy.DocumentedRuleDefault( policy.DocumentedRuleDefault(
name='order:delete', name='order:delete',
check_str='rule:admin', check_str=f'rule:admin or {_MEMBER}',
scope_types=[], scope_types=['project'],
description='Deletes an order.', description='Deletes an order.',
operations=[ operations=[
{ {
'path': '/v1/orders/{order-id}', 'path': '/v1/orders/{order-id}',
'method': 'DELETE' 'method': 'DELETE'
} }
], ],
) )
] ]
 End of changes. 6 change blocks. 
10 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)