neutron-lbaas/neutron/api/v2
Elena Ezhova 74d1093990 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.

Closes-Bug: #1357379
Related-Bug: #1338880
Change-Id: I6537bb1da5ef0d6899bc71e4e949f2c760c103c2
2014-09-23 15:18:51 +04:00
..
__init__.py Remove invalid copyright headers under API module 2014-04-02 11:09:03 -07:00
attributes.py Add L3 Extension for Distributed Routers 2014-07-16 07:33:43 -07:00
base.py Forbid regular users to reset admin-only attrs to default values 2014-09-23 15:18:51 +04:00
resource_helper.py Remove @author(s) from copyright statements 2014-09-15 21:40:09 +09:00
resource.py Send HTTP exceptions in the format expected by neutronclient 2014-08-18 17:21:45 +04:00
router.py Use six.moves.urllib.parse instead of urlparse 2014-02-13 10:19:01 +08:00