diff --git a/api/blueprints/mail/callback.py b/api/blueprints/mail/oauth_callback.py similarity index 100% rename from api/blueprints/mail/callback.py rename to api/blueprints/mail/oauth_callback.py diff --git a/api/blueprints/mail/oauth.py b/api/blueprints/mail/oauth_request.py similarity index 100% rename from api/blueprints/mail/oauth.py rename to api/blueprints/mail/oauth_request.py diff --git a/utils_v2/goog/models/data/auth_tokens.py b/utils_v2/goog/models/data/auth_tokens.py index d6c4cd2..df57f53 100644 --- a/utils_v2/goog/models/data/auth_tokens.py +++ b/utils_v2/goog/models/data/auth_tokens.py @@ -207,7 +207,7 @@ class GoogleAuthTokens(BaseModel): def has_scopes(self, scopes: List[str]) -> bool: """ - Check if all the specified scopes were granted. + Checks if all the specified scopes were granted. :param scopes: The list of scopes to check. These are the permissions you need. :return: True if all specified scoped are present, else False. """ @@ -217,7 +217,12 @@ class GoogleAuthTokens(BaseModel): # Now loop through the needed scopes and check: for scope in scopes: - if scope not in self.scopes + if scope not in self.scopes: + has_scopes = False + break + + # Done here: + return has_scopes # *****************************************************************************************************************