Introduced props app_mode=[portal,backend,multi]

This commit is contained in:
Marko Milić 2019-07-29 14:02:16 +02:00
parent 16d85041ae
commit 5dc497701c

View File

@ -1611,9 +1611,7 @@ Returns a string showed to the developer
Note we use "v" and "_" in the name to match the ApiVersions enumeration in ApiUtil.scala
*/
def versionIsAllowed(version: ApiVersion) : Boolean = {
if(APIUtil.getPropsAsBoolValue("app_mode", false)) {
false
} else {
def checkVersion: Boolean = {
val disabledVersions: List[String] = getDisabledVersions()
val enabledVersions: List[String] = getEnabledVersions()
if (
@ -1624,6 +1622,11 @@ Returns a string showed to the developer
else
false
}
APIUtil.getPropsValue("app_mode", "multi") match {
case mode if mode == "portal" => false
case mode if mode == "backend" => checkVersion
case _ => checkVersion
}
}