Apply bearer token before calling controller's pre().

This is necessary to add oauth support to controllers that use c.user to
enforce permissions.
This commit is contained in:
Logan Hanks
2012-09-11 14:44:03 -07:00
parent 303b116bf1
commit ae7435c78b
2 changed files with 2 additions and 2 deletions

View File

@@ -109,8 +109,8 @@ class ApiController(RedditController, OAuth2ResourceController):
"""
def pre(self):
RedditController.pre(self)
self.check_for_bearer_token()
RedditController.pre(self)
@validatedForm()
def ajax_login_redirect(self, form, jquery, dest):

View File

@@ -942,8 +942,8 @@ class MyredditsController(ListingController, OAuth2ResourceController):
render_cls = MySubredditsPage
def pre(self):
ListingController.pre(self)
self.check_for_bearer_token()
ListingController.pre(self)
@property
def menus(self):