Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
common-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
protokollsystem
common-web
Commits
c3a8dbca
Commit
c3a8dbca
authored
Apr 06, 2018
by
Robin Sonnabend
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.fsmpi.rwth-aachen.de:protokollsystem/common-web
parents
c16fe3b2
b6a8aa25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
auth.py
auth.py
+4
-1
back.py
back.py
+0
-1
csrf.py
csrf.py
+2
-0
No files found.
auth.py
View file @
c3a8dbca
...
...
@@ -17,6 +17,9 @@ class User:
self
.
obsolete
=
obsolete
self
.
permanent
=
permanent
def
__repr__
(
self
):
return
"<User({})>"
.
format
(
self
.
username
)
def
summarize
(
self
):
return
":"
.
join
((
self
.
username
,
","
.
join
(
self
.
groups
),
","
.
join
(
self
.
all_groups
),
...
...
@@ -33,7 +36,7 @@ class User:
timestamp
=
datetime
.
fromtimestamp
(
float
(
timestamp_str
))
obsolete
=
obsolete_str
==
"True"
groups
=
group_str
.
split
(
","
)
all_groups
=
group_str
.
split
(
","
)
all_groups
=
all_
group_str
.
split
(
","
)
permanent
=
permanent_str
==
"True"
return
User
(
name
,
groups
,
all_groups
,
timestamp
,
obsolete
,
permanent
)
...
...
back.py
View file @
c3a8dbca
...
...
@@ -28,7 +28,6 @@ def url(default=default_view, cookie=cookie, **url_args):
def
redirect
(
default
=
default_view
,
cookie
=
cookie
,
**
url_args
):
print
(
request
.
url
,
request
.
url_rule
,
default
,
session
.
get
(
cookie
))
target
=
url
(
default
,
cookie
,
**
url_args
)
if
target
==
request
.
url
:
target
=
default_url
(
default
,
**
url_args
)
...
...
csrf.py
View file @
c3a8dbca
from
functools
import
wraps
from
hmac
import
compare_digest
import
hashlib
import
os
from
flask
import
request
,
abort
,
session
...
...
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