mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-01 07:43:02 +00:00
Reenabled multiple oauth provider
deleted duplicate download counting function
This commit is contained in:
13
cps/ub.py
13
cps/ub.py
@@ -180,12 +180,14 @@ class User(UserBase, Base):
|
||||
default_language = Column(String(3), default="all")
|
||||
mature_content = Column(Boolean, default=True)
|
||||
|
||||
|
||||
if oauth_support:
|
||||
class OAuth(OAuthConsumerMixin, Base):
|
||||
provider_user_id = Column(String(256))
|
||||
user_id = Column(Integer, ForeignKey(User.id))
|
||||
user = relationship(User)
|
||||
|
||||
|
||||
class OAuthProvider(Base):
|
||||
__tablename__ = 'oauthProvider'
|
||||
|
||||
@@ -194,17 +196,6 @@ class OAuthProvider(Base):
|
||||
oauth_client_id = Column(String)
|
||||
oauth_client_secret = Column(String)
|
||||
active = Column(Boolean)
|
||||
# scope = relationship('OAuthScope', backref='oauthProvider')
|
||||
|
||||
|
||||
'''class OAuthScope(Base):
|
||||
__tablename__ = 'oauthScope'
|
||||
id = Column(Integer, primary_key=True)
|
||||
scope = Column(String, unique=True)
|
||||
provider_id = Column(Integer, ForeignKey('oauthProvider.id'))
|
||||
|
||||
def __repr__(self):
|
||||
return u"{0}".format(self.scope)'''
|
||||
|
||||
|
||||
# Class for anonymous user is derived from User base and completly overrides methods and properties for the
|
||||
|
||||
Reference in New Issue
Block a user