aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/mixins.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-05-20 23:29:17 +0100
committerGravatar GitHub <[email protected]>2018-05-20 23:29:17 +0100
commit449d52caf4010ed112f1928bf6b5234bcfb9a339 (patch)
tree3ce59258a68fcb4174610b157f3a3ae9c50be02a /pysite/mixins.py
parentTests directory (#73) (diff)
Privacy/Usability updates (#75)
* Use less intrusive oauth scopes, add login redirect method * Remove debugging prints, add missing __init__ * Work towards new privacy policy * Fix judging state icons on code jam management page * Jammer profile retraction and punishments based on jam status * Linting * [Jams] Deny profile saving for users < 13 years, and finish removal page * Fix tests * Clean up and address Volcyy's review * Add proper login redirection to require_roles decorator * Fix template is_staff() and add staff link to navigation * Address lemon's review * Linting * Privacy page formatting * Privacy page formatting
Diffstat (limited to 'pysite/mixins.py')
-rw-r--r--pysite/mixins.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pysite/mixins.py b/pysite/mixins.py
index 6e5032ab..d0e822bf 100644
--- a/pysite/mixins.py
+++ b/pysite/mixins.py
@@ -4,7 +4,7 @@ from flask import Blueprint
from rethinkdb.ast import Table
from pysite.database import RethinkDB
-from pysite.oauth import OauthBackend
+from pysite.oauth import OAuthBackend
class DBMixin:
@@ -58,7 +58,7 @@ class DBMixin:
return self._db()
-class OauthMixin:
+class OAuthMixin:
"""
Mixin for the classes that need access to a logged in user's information. This class should be used
to grant route's access to user information, such as name, email, id, ect.
@@ -80,11 +80,11 @@ class OauthMixin:
user_data returns None, if the user isn't logged in.
- * oauth (OauthBackend): The instance of pysite.oauth.OauthBackend, connected to the RouteManager.
+ * oauth (OAuthBackend): The instance of pysite.oauth.OAuthBackend, connected to the RouteManager.
"""
@classmethod
- def setup(cls: "OauthMixin", manager: "pysite.route_manager.RouteManager", blueprint: Blueprint):
+ def setup(cls: "OAuthMixin", manager: "pysite.route_manager.RouteManager", blueprint: Blueprint):
if hasattr(super(), "setup"):
super().setup(manager, blueprint) # pragma: no cover
@@ -99,5 +99,5 @@ class OauthMixin:
return self.oauth.user_data()
@property
- def oauth(self) -> OauthBackend:
+ def oauth(self) -> OAuthBackend:
return self._oauth()