Don't raise InvalidScope exception when do_raise parameter is set to False
Bug #1965315 reported by
Slawek Kaplonski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.policy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Enforcer.enforce() method has got parameter do_raise which is False by default and in such case that method don't raise PolicyNotAuthorized exception and returns False in case when policy wasn't authorized.
Unfortunately it's not working the same way for scope enforcing and InvalidScope exception is raised always, no matter what is value of the do_raise parameter. It should raise this exception only in case when do_raise is set to True.
To post a comment you must log in.
Fix proposed to branch: master /review. opendev. org/c/openstack /oslo.policy/ +/834222
Review: https:/