diff options
Diffstat (limited to 'apifw/bottleapp.py')
-rw-r--r-- | apifw/bottleapp.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apifw/bottleapp.py b/apifw/bottleapp.py index ab92f3c..20e57ef 100644 --- a/apifw/bottleapp.py +++ b/apifw/bottleapp.py @@ -102,10 +102,9 @@ class BottleAuthorizationPlugin: # bottle.Route object. method = route.get('method', 'GET') path = route.get('path') - if not path: - rule = route.get('rule') - path = re.sub(r'/<[^>]+>', '', rule) - return (method, path) + rule = route.get('rule') + scope = self.get_scope_for_route(method, path or rule) + return (method, scope) def apply(self, callback, route): def wrapper(*args, **kwargs): |