Discussion (6)0
Log in or sign up to continue

See class documentation for Security.Applications.


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) {
        Set tApplication.DeepSeeEnabled = pValue
        Set tSC = tApplication.%Save()
    } Catch e {
        Set tSC = e.AsStatus()
    Quit tSC



USER>s sc = ##class(DC.Demo.DeepSeeEnable).SetDSFlag("/csp/user",1)
USER>w sc

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

do EnableDeepSee^%SYS.cspServer("/csp/samples/")

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).