From 449d52caf4010ed112f1928bf6b5234bcfb9a339 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sun, 20 May 2018 23:29:17 +0100 Subject: 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 --- pysite/mixins.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pysite/mixins.py') 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() -- cgit v1.2.3