neutron/neutron/api/v2
Elena Ezhova dd4b77ff53 Forbid regular users to reset admin-only attrs to default values
A regular user can reset an admin-only attribute to its default
value due to the fact that a corresponding policy rule is
enforced only in the case when an attribute is present in the
target AND has a non-default value.

Added a new attribute "attributes_to_update" which contains a list
of all to-be updated attributes to the body of the target that is
passed to policy.enforce.

Changed a check for whether an attribute is explicitly set.
Now, in the case of update, the function should not pay attention
to a default value of an attribute, but check whether it was
explicitly marked as being updated.

Added unit-tests.

Conflicts:
	neutron/common/constants.py

Closes-Bug: #1357379
Related-Bug: #1338880
Change-Id: I6537bb1da5ef0d6899bc71e4e949f2c760c103c2
(cherry picked from commit 74d1093990)
2014-09-25 17:14:33 +02:00
..
__init__.py Rename Quantum to Neutron 2013-07-06 15:02:43 -04:00
attributes.py Hide ipv6 subnet API attributes 2014-04-08 19:36:00 -04:00
base.py Forbid regular users to reset admin-only attrs to default values 2014-09-25 17:14:33 +02:00
resource.py Merge "Remove unused 'as e' in exception blocks" 2014-03-04 03:57:24 +00:00
resource_helper.py Add support for tenant-provided NSX gateways devices 2014-03-07 23:00:03 +01:00
router.py Use six.moves.urllib.parse instead of urlparse 2014-02-13 10:19:01 +08:00