Skip to content

Commit

Permalink
consistency renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
byewokko committed Dec 4, 2024
1 parent 261ba4e commit 063e6ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions asab/web/auth/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ async def generate_token(self, request):
return asab.web.rest.json_response(request, data)
```
"""
def decorator_require(handler):
def _require_resource_access_decorator(handler):

@functools.wraps(handler)
async def _require_wrapper(*args, **kwargs):
async def _require_resource_access_wrapper(*args, **kwargs):
authz = Authz.get()
if authz is None:
raise AccessDeniedError()
Expand All @@ -41,9 +41,9 @@ async def _require_wrapper(*args, **kwargs):

return await handler(*args, **kwargs)

return _require_wrapper
return _require_resource_access_wrapper

return decorator_require
return _require_resource_access_decorator


def noauth(handler):
Expand Down

0 comments on commit 063e6ca

Please sign in to comment.