magnum/magnum/hacking
houming-wang 7b754ae390 WSGI enfore fails should return 403 instead of 500
When user is not authorized to perform operations defined in policy
file, it should return a 403 error. The 500 error is incorrect.
This patch do the following changes:
1. Raise a PolicyNotAuthorized 403 exception when normal user
without admin privilege run command 'magnum service-list'.
2. Remove unnecessary hacking rule M301 'decorator must be
the first decorator on a method'.
3. Fix failed enforcement test cases introduced by 403
PolicyNotAuthorized exception.

Change-Id: Ie5a7d138cdb8b226686c189ae86f251c0a1329c8
Closes-Bug: #1520311
2016-01-04 16:36:30 -05:00
..
__init__.py Add hacking rule framework for magnum 2015-06-17 09:00:06 +08:00
checks.py WSGI enfore fails should return 403 instead of 500 2016-01-04 16:36:30 -05:00