Skip to content

Commit

Permalink
token: Fix missing FULL_ACCESS check
Browse files Browse the repository at this point in the history
  • Loading branch information
kjoconnor committed Aug 24, 2015
1 parent 03e4a18 commit 7d32950
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions r2/r2/models/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ def has_access(self, subreddit, required_scopes):
return (self.scopes >= required_scopes)

def has_any_scope(self, required_scopes):
if self.FULL_ACCESS in self.scopes:
return True

return bool(self.scopes & required_scopes)

def is_valid(self):
Expand Down

0 comments on commit 7d32950

Please sign in to comment.