Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
02bf849e
Verified
Commit
02bf849e
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Add optional support for SMS and phone calls using Twilio.
parent
f56910ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!59
Resolve "2FA"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
biscuit/core/settings.py
+8
-0
8 additions, 0 deletions
biscuit/core/settings.py
biscuit/core/urls.py
+5
-0
5 additions, 0 deletions
biscuit/core/urls.py
pyproject.toml
+2
-0
2 additions, 0 deletions
pyproject.toml
with
15 additions
and
0 deletions
biscuit/core/settings.py
+
8
−
0
View file @
02bf849e
...
...
@@ -324,4 +324,12 @@ CRON_CLASSES = [
ANONYMIZE_ENABLED
=
_settings
.
get
(
'
maintenance.anonymisable
'
,
True
)
if
_settings
.
get
(
'
2fa.twilio.sid
'
,
None
):
MIDDLEWARE
.
insert
(
MIDDLEWARE
.
index
(
'
django_otp.middleware.OTPMiddleware
'
)
+
1
,
'
two_factor.middleware.threadlocals.ThreadLocals
'
)
TWILIO_SID
=
_settings
.
get
(
'
2fa.twilio.sid
'
)
TWILIO_TOKEN
=
_settings
.
get
(
'
2fa.twilio.token
'
)
TWILIO_CALLER_ID
=
_settings
.
get
(
'
2fa.twilio.callerid
'
)
TWO_FACTOR_CALL_GATEWAY
=
'
two_factor.gateways.twilio.gateway.Twilio
'
TWO_FACTOR_SMS_GATEWAY
=
'
two_factor.gateways.twilio.gateway.Twilio
'
_settings
.
populate_obj
(
sys
.
modules
[
__name__
])
This diff is collapsed.
Click to expand it.
biscuit/core/urls.py
+
5
−
0
View file @
02bf849e
...
...
@@ -38,6 +38,11 @@ urlpatterns = [
path
(
''
,
include
(
tf_urls
))
]
# Add URLs for optional features
if
hasattr
(
settings
,
'
TWILIO_ACCOUNT_SID
'
):
from
two_factor.gateways.twilio.urls
import
urlpatterns
as
tf_twilio_urls
# noqa
urlpatterns
+=
[
path
(
''
,
include
(
tf_twilio_urls
))]
# Serve javascript-common if in development
if
settings
.
DEBUG
:
urlpatterns
+=
static
(
'
/javascript/
'
,
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
2
−
0
View file @
02bf849e
...
...
@@ -54,9 +54,11 @@ django-otp = "^0.7.4"
django-formtools
=
"^2.1"
django-two-factor-auth
=
"^1.9"
django-otp-yubikey
=
'^0.5.2'
twilio
=
{
version
=
"^6.33"
,
optional
=
true
}
[tool.poetry.extras]
ldap
=
[
"django-auth-ldap"
]
twilio
=
[
"twilio"
]
[tool.poetry.dev-dependencies]
sphinx
=
"^2.1"
...
...
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