Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
ef8a6fa1
Commit
ef8a6fa1
authored
Nov 09, 2013
by
Jean Michel Rouly
Browse files
Parses logout token and myaccount token.
parent
c7532943
Changes
1
Show whitespace changes
Inline
Side-by-side
wsgi/library.py
View file @
ef8a6fa1
...
...
@@ -338,6 +338,12 @@ def get_top( logged_in=False ):
top
=
f
.
read
()
f
.
close
()
myaccount
=
"""| [ <a href="/account">My Account</a> ]"""
if
logged_in
:
top
=
top
.
replace
(
"%{myaccount}%"
,
myaccount
)
else
:
top
=
top
.
replace
(
"%{myaccount}%"
,
""
)
mylinks
=
"""| [ <a href="/mylinks">My Links</a> ]"""
if
logged_in
:
top
=
top
.
replace
(
"%{mylinks}%"
,
mylinks
)
...
...
@@ -352,6 +358,12 @@ def get_bottom( logged_in=False ):
bottom
=
f
.
read
()
f
.
close
()
logout
=
"""<a href="/logout">Log Out</a>"""
if
logged_in
:
bottom
=
bottom
.
replace
(
"%{logout}%"
,
logout
)
else
:
bottom
=
bottom
.
replace
(
"%{logout}%"
,
""
)
return
bottom
...
...
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