Update references to request.authenticated_userid
Per warnings from Pyramid, old method will go away in 1.8
This commit is contained in:
parent
6bf60365ba
commit
2c27120eb4
2 changed files with 3 additions and 4 deletions
|
@ -30,7 +30,7 @@ from rattail.db.auth import authenticate_user, set_user_password
|
|||
|
||||
import formencode
|
||||
from pyramid.httpexceptions import HTTPFound
|
||||
from pyramid.security import remember, forget, authenticated_userid
|
||||
from pyramid.security import remember, forget
|
||||
from pyramid_simpleform import Form
|
||||
from webhelpers.html import literal
|
||||
from webhelpers.html import tags
|
||||
|
@ -47,7 +47,7 @@ def forbidden(request):
|
|||
appropriate view.
|
||||
"""
|
||||
msg = literal("You do not have permission to do that.")
|
||||
if not authenticated_userid(request):
|
||||
if not request.authenticated_userid:
|
||||
msg += literal(" (Perhaps you should %s?)" %
|
||||
tags.link_to("log in", request.route_url('login')))
|
||||
# Store current URL in session, for smarter redirect after login.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue