Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
red_brick_board
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Ciella Francisco
red_brick_board
Commits
d6909def
Commit
d6909def
authored
Mar 11, 2024
by
gab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added handling page in auth_receiver for non ateneo google login
parent
c266ea8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
views.py
redbrickboard/accounts/views.py
+3
-2
No files found.
redbrickboard/accounts/views.py
View file @
d6909def
...
...
@@ -10,7 +10,7 @@ from .forms import CustomUserCreationForm, CustomUserAuthenticationForm
from
django.contrib.auth.models
import
auth
from
django.contrib.auth
import
authenticate
,
login
,
logout
from
django
import
forms
from
.
import
models
...
...
@@ -75,7 +75,8 @@ def auth_receiver(request):
password
=
user_data
[
'sub'
]
+
'google'
+
user_data
[
'name'
]
logInUser
=
authenticate
(
request
,
email
=
email
,
password
=
password
)
if
"@ateneo.edu"
not
in
email
and
"@student.ateneo.edu"
not
in
email
and
"@alumni.ateneo.edu"
not
in
email
:
return
HttpResponse
(
"Your login must be an ateneo email address. Try again <a href='./login'>here</a>"
,
status
=
403
)
if
logInUser
is
not
None
:
pass
else
:
...
...
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