]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix UsedLimitsController's authorizer to soft
authorGaozexu <gaozx.fnst@cn.fujitsu.com>
Tue, 22 Sep 2015 03:35:37 +0000 (11:35 +0800)
committerGaozexu <gaozx.fnst@cn.fujitsu.com>
Wed, 28 Oct 2015 06:53:55 +0000 (14:53 +0800)
commit4bdeb045e491a86aeb8a1487798e598a2fa56e2f
treec22fb1b9f2aec7a60fdfd82dcf2fe03021c34b63
parentcbb55074de48176cbaa3f31a5b1d595b8aad7aa8
Fix UsedLimitsController's authorizer to soft

The rule "limits_extension:used_limits" is used by
"UsedLimitsController" which is a controller extension and it extends
"limits" api. Most of controller extensions authorize user's context
by applying the function "extensions.soft_extension_authorizer()",
but "UsedLimitsController" applies "extensions.extension_authorizer"
and this may cause 403 Forbidden error.

In this patch, I changed UsedLimitsController's authorizer to
"soft_extension_authorizer".

APIImpact

Co-Authored-By: ZhuChunzhan <zhucz@cn.fujitsu.com>
Change-Id: I8a4163ca89236b35c2c6ba10bcd98f8c42ef9089
Closes-Bug: #1497868
cinder/api/contrib/used_limits.py
cinder/tests/unit/api/contrib/test_used_limits.py