-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is_anonymous, login_required, has_permission helpers #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation update is required: you have added 3 new public functions
aiohttp_security/api.py
Outdated
def wrapped(*args, **kwargs): | ||
request = args[-1] | ||
if not isinstance(request, web.BaseRequest): | ||
msg = 'Incorrect decorator usage. ' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use brackets instead of backslash
aiohttp_security/api.py
Outdated
def wrapped(*args, **kwargs): | ||
request = args[-1] | ||
if not isinstance(request, web.BaseRequest): | ||
msg = 'Incorrect decorator usage. ' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brackets
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
- Coverage 97.03% 95.36% -1.68%
==========================================
Files 10 10
Lines 405 561 +156
Branches 8 18 +10
==========================================
+ Hits 393 535 +142
- Misses 10 20 +10
- Partials 2 6 +4
Continue to review full report at Codecov.
|
Helper functions and decorators.
True
if user is not authorized andFalse
if user is authorized.@login_required
permission
.