Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
08d0404e
Commit
08d0404e
authored
Aug 13, 2017
by
Jonathan Rehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mature_content property to Anonymous class
parent
91cdb5f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
ub.py
cps/ub.py
+2
-1
No files found.
cps/ub.py
View file @
08d0404e
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment