bug fix: secure key location fix

pull/21/head
Steve Nyemba 2 weeks ago
parent cd87abbd51
commit f9d39314f4

@ -36,8 +36,9 @@ version {meta.__version__}
{meta.__license__}"""
# PASSED = ' '.join(['[',colored('\u2713', 'green'),']'])
# FAILED= ' '.join(['[',colored('\u2717','red'),']'])
URL = os.environ['QCMS_HOST_URL'] if 'QCMS_HOST_URL' in os.environ else 'https://dev.the-phi.com/git/qcms/themes.git'
FAILED = '[ [red] \u2717 [/red] ]'
PASSED = '[ [green] \u2713 [/green] ]'
@ -162,10 +163,10 @@ def secure(
_config = cms.engine.config.get(manifest)
if 'source' not in _config['system']:
_config['system']['source'] = {'id':'disk'}
_config['system']['source']['key'] = keyfile
_config['system']['source']['key'] = os.path.abspath(keyfile)
cms.engine.config.write(_config,manifest)
_msg = f"""{PASSED} [bold]{_config['layout']['header']['title']}[/bold] : A key was generated and written to {keyfile}
use this key in header to enable reload of the site ...`
use this key in header to enable reload of the site ...
"""
else:
_msg = f"""{FAILED} [bold]{_config['system']['layout']['header']['title']}[/bold] : could [bold]NOT[/bold] generate a key, because it would seem you already have one
@ -364,7 +365,7 @@ def bootup (
def theme_list (
manifest:Annotated[str,typer.Argument(help="path of the manifest file")],
# manifest:str= typer.Option(default=None,help="Optional path to a site, otherwise remote themes will be listed"),
url:str=typer.Option(default="https://dev.the-phi.com/git/qcms/themes.git", help="git/github site where the themes live")
url:str=typer.Option(default=URL, help="git/github site where the themes live")
# remote:bool = typer.Option("--remote/--local",help="print list of themes available (remotely)"),
) :
"""
@ -398,8 +399,11 @@ def theme_list (
def theme_set (
manifest:Annotated[str,typer.Argument(help="path of the manifest file")],
name:str = typer.Option(default='default',help='name of the theme to apply'),
url:str=typer.Option(default="https://dev.the-phi.com/git/qcms/themes.git", help="git/github site where the themes live")
url:str=typer.Option(default=URL, help="git/github site where the themes live")
) :
"""
This function will set/update a theme for a given qcms app/site. If the theme doesn't exist it will download it
"""
manifest = get_manifest(manifest)
_config = cms.engine.config.get(manifest)
_layout = _config['layout']

@ -1,5 +1,5 @@
__author__ = "Steve L. Nyemba"
__version__= "2.2.14"
__version__= "2.2.16"
__email__ = "steve@the-phi.com"
__license__="""
Copyright 2010 - 2024, Steve L. Nyemba, Vanderbilt University Medical Center

Loading…
Cancel
Save