Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
50b19a9d
Commit
50b19a9d
authored
Mar 05, 2017
by
Administrator
Browse files
Use has_public_view_right for checking which protocols are public
parent
c1a0587a
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
50b19a9d
...
...
@@ -371,10 +371,8 @@ def list_protocols():
))
protocols
=
[
protocol
for
protocol
in
protocol_query
.
all
()
if
(
not
is_logged_in
and
protocol
.
protocoltype
.
is_public
)
or
(
is_logged_in
and
(
protocol
.
protocoltype
.
public_group
in
user
.
groups
or
protocol
.
protocoltype
.
private_group
in
user
.
groups
))]
if
protocol
.
protocoltype
.
has_public_view_right
(
user
)
]
def
_matches_search
(
content
):
content
=
content
.
lower
()
for
search_term
in
search_terms
:
...
...
Write
Preview
Supports
Markdown
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