Skip to content

Instantly share code, notes, and snippets.

@zellyn
Created May 12, 2010 20:49
Show Gist options
  • Save zellyn/399106 to your computer and use it in GitHub Desktop.
Save zellyn/399106 to your computer and use it in GitHub Desktop.
class SpecialOpenIDAuth(OpenIDAuth):
def authenticate(self, identity=None):
user = super(SpecialOpenIDAuth, self).authenticate(identity)
if user and is_staff_openid_provider(identity):
user.is_staff = True
user.save()
return user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment