mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 13:07:02 +00:00
Introduced props app_mode=[portal,backend,multi]
This commit is contained in:
parent
16d85041ae
commit
5dc497701c
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user