-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from UKB-IT-Sec/38-hide-armis-import-if-not-co…
…nfigured Armis import is now hidden if not configured
- Loading branch information
Showing
4 changed files
with
40 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from helper.armis import get_tenant_url | ||
from django.core.cache import cache | ||
|
||
|
||
# is armis configured? We need this to render to nav-bar correctly | ||
def armis_context(request): | ||
armis_is_configured = cache.get("armis_is_configured") | ||
if armis_is_configured is None: | ||
armis_is_configured = get_tenant_url() != "https://" | ||
cache.set("armis_is_configured", armis_is_configured) | ||
return {"armis_is_configured": armis_is_configured} |
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