Add support for protecting lecturer pages on deploy
On it4kt deploying service, a new field named path-protection
is accepted. It can contain JSON-formatted dictionary mapping relative paths of the course archive that should have protected access to a string of user credentials ("username:password"), e.g.:
{
"lecturer": "lecturer:secret"
}
This merge request adds support for this new feature by introducing one new config.py
option and one environment variable required on deploy-time:
-
DEPLOY_PROTECT_LECTURER
(boolean) inconfig.py
specifies whether the/lecturer
path of the deployed course should be protected with user credentials. -
DEPLOY_LECTURER_CREDENTIALS
(string) environment variable defines the desired credentials.
If DEPLOY_PROTECT_LECTURER
is set to True
(it is False
in default config), missing DEPLOY_LECTURER_CREDENTIALS
environment variable, or one in a wrong format (missing colon), is considered as an error and the deployment is aborted.
Edited by Ján Juhár