Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
account-app
Manage
Activity
Members
Labels
Plan
Issues
8
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
account-app
Commits
c6942887
Commit
c6942887
authored
2 years ago
by
Ravi Tripathi
Browse files
Options
Downloads
Patches
Plain Diff
Updated the code using black reformatter.
parent
865ffa2e
No related branches found
No related tags found
1 merge request
!60
Update to only use eppa if it's provided in the headers
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/__init__.py
+4
-4
4 additions, 4 deletions
app/__init__.py
with
4 additions
and
4 deletions
app/__init__.py
+
4
−
4
View file @
c6942887
...
...
@@ -44,7 +44,6 @@ def create_app(config_name):
Bootstrap
(
app
)
# allowing app to use bootstrap
def
get_authorized_user
():
user
=
{
"
username
"
:
request
.
headers
.
get
(
"
REMOTE_USER
"
),
"
fullname
"
:
request
.
headers
.
get
(
"
Displayname
"
),
...
...
@@ -58,7 +57,6 @@ def create_app(config_name):
"
/
"
,
methods
=
[
"
GET
"
,
"
POST
"
]
)
# initial route to display the reg page
def
index
():
valid_eppa
=
app_vars
.
valid_eppa
if
"
uid
"
not
in
session
:
...
...
@@ -71,8 +69,10 @@ def create_app(config_name):
"
redir
"
,
app_vars
.
default_referrer
)
if
'
eppa
'
in
request
.
headers
:
if
not
any
(
item
in
session
[
"
user
"
].
get
(
"
eppa
"
)
for
item
in
valid_eppa
):
if
"
eppa
"
in
request
.
headers
:
if
not
any
(
item
in
session
[
"
user
"
].
get
(
"
eppa
"
)
for
item
in
valid_eppa
):
return
render_template
(
"
account/unauthorized.html
"
,
unauthorized_msg
=
messages
.
unauthorized_message
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment