Class DC.Demo.DeepSeeEnable
{
ClassMethod SetDSFlag(pApplicationName As %String, pValue As %Boolean = 1) As %Status
{
Set tSC = $$$OK
Try {
New $Namespace
Set $Namespace = "%SYS"
Set tApplication = ##class(Security.Applications).%OpenId(pApplicationName,,.tSC)
If $$$ISERR(tSC) {
Quit
}
Set tApplication.DeepSeeEnabled = pValue
Set tSC = tApplication.%Save()
} Catch e {
Set tSC = e.AsStatus()
}
Quit tSC
}
}
See class documentation for Security.Applications.
Example:
Use:
Thank you very much!
Some of such configuration classes contains methods Modify and Get, it may help to easy modify configuration, in a few lines
set props("DeepSeeEnabled")=1
set sc=##class(Security.Applications).Modify("/csp/myapp", .props)another option
1. Go to: SMP -> Menu -> Web Apps -> Your web app.
2. Click on DeepSee checkbox.
3. Press Save.
The question was how to make it programmatically (via Caché ObjectScript).