Written by

Back End Developer InterSystems Community Sites at InterSystems
Question Semion Makarov · Apr 10, 2017

How to turn on DeepSee flag on Web App

To set up Web Application, I need to turn on the DeepSee flag using Caché ObjectScript. How can i do it?

Comments

Timothy Leavitt · Apr 10, 2017

See class documentation for Security.Applications.

Example:

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
}

}

Use:

USER>s sc = ##class(DC.Demo.DeepSeeEnable).SetDSFlag("/csp/user",1)
 
USER>w sc
1
0
Dmitry Maslennikov  Apr 11, 2017 to Timothy Leavitt

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)
0
Fabio Goncalves · Apr 10, 2017

another option

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

0
Eduard Lebedyuk · Apr 10, 2017

1. Go to: SMP -> Menu -> Web Apps -> Your web app.

2. Click on DeepSee checkbox.

3. Press Save.

0
Evgeny Shvarov  Apr 10, 2017 to Eduard Lebedyuk

The question was how to make it programmatically (via Caché ObjectScript).

0