Skip to content

Commit

Permalink
Add is_first_party method to OAuth2Client.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjoconnor committed Apr 18, 2016
1 parent e4433a8 commit df36fc7
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 @@ -546,6 +546,9 @@ def revoke(self, account):
def is_confidential(self):
return self.app_type not in self.PUBLIC_APP_TYPES

def is_first_party(self):
return self.has_developer(Account.system_user())


class OAuth2ClientsByDeveloper(tdb_cassandra.View):
"""Index providing access to the list of OAuth2Clients of which an Account is a developer."""
Expand Down

0 comments on commit df36fc7

Please sign in to comment.