Add mature_content property to Anonymous class
This commit is contained in:
parent
91cdb5f60f
commit
08d0404e9c
1 changed files with 2 additions and 1 deletions
|
@ -167,13 +167,14 @@ class Anonymous(AnonymousUserMixin, UserBase):
|
|||
self.loadSettings()
|
||||
|
||||
def loadSettings(self):
|
||||
data = session.query(User).filter(User.role.op('&')(ROLE_ANONYMOUS) == ROLE_ANONYMOUS).first()
|
||||
data = session.query(User).filter(User.role.op('&')(ROLE_ANONYMOUS) == ROLE_ANONYMOUS).first() # type: User
|
||||
settings = session.query(Settings).first()
|
||||
self.nickname = data.nickname
|
||||
self.role = data.role
|
||||
self.sidebar_view = data.sidebar_view
|
||||
self.default_language = data.default_language
|
||||
self.locale = data.locale
|
||||
self.mature_content = data.mature_content
|
||||
self.anon_browse = settings.config_anonbrowse
|
||||
|
||||
def role_admin(self):
|
||||
|
|
Loading…
Reference in a new issue