-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CONCD-660 Merge Main into Feature branch (#2237)
* Removed first/last name fields from admin user list display (#2234) * Added /healthz and /metrics to URLs ignored in maintenance mode (#2236) * Added toggle for allowing staff to use the front-end during maintenance mode (#2238) * Added control of access to the frontend during maintenance mode via the cache * Implementation of views to turn the front-end on and off for staff during maintenance * Implement updates to checkout that allow fetching git tags needed for setuptools_scm semver tagging (#2239) * a few more small repairs (#2240) * Implement updates to checkout that allow fetching git tags needed for setuptools_scm semver tagging * remove ref on checkout step for dev deploy * implement update for checkoutv4 for tags needed for setuptools - feature * Update feature cluster (#2241) * Implement updates to checkout that allow fetching git tags needed for setuptools_scm semver tagging * remove ref on checkout step for dev deploy * implement update for checkoutv4 for tags needed for setuptools - feature * Map feature deployment to its own environment * Updating stylelint and related libraries (#2244) * Updated stylelint versions * Updated precommit hook config to use new versions of stylelint and related libraries. Updated base.css for updated version of stylelint * Reverted global function and color function changes since gulp doesn't recognize them --------- Co-authored-by: Josh Stegmaier <104993387+joshuastegmaier@users.noreply.github.com> Co-authored-by: Jennifer Kuenning <72825410+jkueloc@users.noreply.github.com>
- Loading branch information
1 parent
faf21a6
commit 0acf647
Showing
16 changed files
with
1,147 additions
and
1,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from django.core.cache import cache | ||
from maintenance_mode.http import ( | ||
need_maintenance_response as base_need_maintenance_response, | ||
) | ||
|
||
|
||
def _need_maintenence_frontend(request): | ||
if not hasattr(request, "user"): | ||
return | ||
|
||
user = request.user | ||
|
||
frontend_available = cache.get("maintenance_mode_frontend_available", False) | ||
if frontend_available and (user.is_staff or user.is_superuser): | ||
return False | ||
|
||
|
||
def need_maintenance_response(request): | ||
value = base_need_maintenance_response(request) | ||
if value is True: | ||
value = _need_maintenence_frontend(request) | ||
if isinstance(value, bool): | ||
return value | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from maintenance_mode.http import get_maintenance_response | ||
from maintenance_mode.middleware import ( | ||
MaintenanceModeMiddleware as BaseMaintenanceModeMiddleware, | ||
) | ||
|
||
from .maintenance import need_maintenance_response | ||
|
||
|
||
class MaintenanceModeMiddleware(BaseMaintenanceModeMiddleware): | ||
def process_request(self, request): | ||
if need_maintenance_response(request): | ||
return get_maintenance_response(request) | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.