Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
Hsin-Yu Chien
edx-platform-release
Commits
80b977ff
Commit
80b977ff
authored
6 years ago
by
Felipe Montoya
Browse files
Options
Downloads
Patches
Plain Diff
Make the studio login over the lms optional using a feature flag
parent
5d3c9b36
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cms/envs/production.py
+4
-0
4 additions, 0 deletions
cms/envs/production.py
cms/templates/widgets/header.html
+9
-2
9 additions, 2 deletions
cms/templates/widgets/header.html
cms/templates/widgets/user_dropdown.html
+8
-2
8 additions, 2 deletions
cms/templates/widgets/user_dropdown.html
with
21 additions
and
4 deletions
cms/envs/production.py
+
4
−
0
View file @
80b977ff
...
...
@@ -298,6 +298,10 @@ HEARTBEAT_CHECKS = ENV_TOKENS.get('HEARTBEAT_CHECKS', HEARTBEAT_CHECKS)
HEARTBEAT_EXTENDED_CHECKS
=
ENV_TOKENS
.
get
(
'
HEARTBEAT_EXTENDED_CHECKS
'
,
HEARTBEAT_EXTENDED_CHECKS
)
HEARTBEAT_CELERY_TIMEOUT
=
ENV_TOKENS
.
get
(
'
HEARTBEAT_CELERY_TIMEOUT
'
,
HEARTBEAT_CELERY_TIMEOUT
)
# Login using the LMS as the identity provider
if
FEATURES
.
get
(
'
DISABLE_STUDIO_SSO_OVER_LMS
'
,
False
):
LOGIN_URL
=
EDX_ROOT_URL
+
'
/signin
'
# Specific setting for the File Upload Service to store media in a bucket.
FILE_UPLOAD_STORAGE_BUCKET_NAME
=
ENV_TOKENS
.
get
(
'
FILE_UPLOAD_STORAGE_BUCKET_NAME
'
,
FILE_UPLOAD_STORAGE_BUCKET_NAME
)
FILE_UPLOAD_STORAGE_PREFIX
=
ENV_TOKENS
.
get
(
'
FILE_UPLOAD_STORAGE_PREFIX
'
,
FILE_UPLOAD_STORAGE_PREFIX
)
...
...
This diff is collapsed.
Click to expand it.
cms/templates/widgets/header.html
+
9
−
2
View file @
80b977ff
...
...
@@ -230,8 +230,15 @@
% else:
<
%
login_url =
settings.LMS_ROOT_URL
+
'/
login
'
register_url =
settings.LMS_ROOT_URL
+
'/
register
'
if
settings.FEATURES.get
('
DISABLE_STUDIO_SSO_OVER_LMS
',
False
)
:
login_url =
settings.LOGIN_URL
else:
login_url =
'{lms_root_url}/login?next={next_url}'
.
format
(
lms_root_url=
settings.LMS_ROOT_URL,
next_url=
current_url,
)
%
>
<nav
class=
"nav-not-signedin nav-pitch"
aria-label=
"${_('Account')}"
>
<h2
class=
"sr-only"
>
${_("Account Navigation")}
</h2>
...
...
@@ -245,7 +252,7 @@
</li>
% endif
<li
class=
"nav-item nav-not-signedin-signin"
>
<a
class=
"action action-signin"
href=
"${login_url}
?next=${current_url}
"
>
${_("Sign In")}
</a>
<a
class=
"action action-signin"
href=
"${login_url}"
>
${_("Sign In")}
</a>
</li>
</ol>
</nav>
...
...
This diff is collapsed.
Click to expand it.
cms/templates/widgets/user_dropdown.html
+
8
−
2
View file @
80b977ff
...
...
@@ -40,7 +40,13 @@
<span
class=
"icon fa fa-caret-down ui-toggle-dd"
aria-hidden=
"true"
></span>
</h3>
<
%
logout_url =
settings.LMS_ROOT_URL
+
'/
logout
'
if
settings.FEATURES.get
('
DISABLE_STUDIO_SSO_OVER_LMS
',
False
)
:
logout_url =
reverse('logout')
else:
logout_url =
'{lms_root_url}/logout?next={next_url}'
.
format
(
lms_root_url=
settings.LMS_ROOT_URL,
next_url=
current_site_url,
)
%
>
<div
class=
"wrapper wrapper-nav-sub"
>
<div
class=
"nav-sub"
>
...
...
@@ -54,7 +60,7 @@
</li>
% endif
<li
class=
"nav-item nav-account-signout"
>
<a
class=
"action action-signout"
href=
"${logout_url}
?next=${current_site_url}
"
>
${_("Sign Out")}
</a>
<a
class=
"action action-signout"
href=
"${logout_url}"
>
${_("Sign Out")}
</a>
</li>
</ul>
</div>
...
...
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