From 8e50b54b03330ee58678ecdf59c5d437ff479ca1 Mon Sep 17 00:00:00 2001 From: Evgeny Shvarov Date: Sat, 9 Mar 2019 00:02:16 +0300 Subject: [PATCH] Fixed umlyuts and OS Authentication added --- Dockerfile | 6 +++++- dswinstaller.cls | 30 ++++++++++++++++++------------ src/cls/Community/Utils.cls | 12 +++++++++++- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index fafd8c3..3275b9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,11 +38,15 @@ RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \ " Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \ " Do ##class(Security.Users).AddRoles(\"admin\", \"%ALL\")\n" \ " do \$system.OBJ.Load(\"/opt/app/dswinstaller.cls\",\"ck\")\n" \ + " Do ##class(Security.System).Get(,.p)\n" \ + " Set p(\"AutheEnabled\")=p(\"AutheEnabled\")+16\n" \ + " Do ##class(Security.System).Modify(,.p)\n" \ + " set ^%SYS(\"CSP\",\"DefaultFileCharset\")=\"utf-8\"\n" \ # " do \$system.OBJ.Load(\"/tmp/deps/Cache-MDX2JSON-master/MDX2JSON/Installer.cls.xml\",\"ck\")\n" \ # " do \$system.OBJ.Load(\"/tmp/deps/deepseeweb.xml\",\"ck\")\n" \ " s sc=##class(DSWMDX2JSON.Installer).setup()\n" \ " If 'sc do \$zu(4, \$JOB, 1)\n" \ - "do CreateDatabase^%SYS.SQLSEC(\"DCANALYTICS\",\"\",,0)\n" \ + # "do CreateDatabase^%SYS.SQLSEC(\"DCANALYTICS\",\"\",,0)\n" \ "zn \"DCANALYTICS\"\n" \ " do \$system.OBJ.ImportDir(\"/opt/app/src\",,\"ck\",,1)\n" \ " do ##class(Community.Utils).setup(\"/opt/app/globals.xml\")" \ diff --git a/dswinstaller.cls b/dswinstaller.cls index 7212da5..6d4e72d 100644 --- a/dswinstaller.cls +++ b/dswinstaller.cls @@ -1,13 +1,24 @@ -Class DSWMDX2JSON.Installer +Class DSWMDX2JSON.Installer { XData setup [ XMLNamespace = INSTALLER ] { - + + + + + + + + + - - @@ -20,7 +31,7 @@ XData setup [ XMLNamespace = INSTALLER ] - + @@ -38,12 +49,7 @@ XData setup [ XMLNamespace = INSTALLER ] } -ClassMethod setup( - ByRef pVars, - pLogLevel As %Integer = 3, - pInstaller As %Installer.Installer, - pLogger As %Installer.AbstractLogger - ) As %Status [ CodeMode = objectgenerator, Internal ] +ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ] { do %code.WriteLine($char(9)_"set pVars(""CURRENTCLASS"")="""_%classname_"""") do %code.WriteLine($char(9)_"set pVars(""CURRENTNS"")="""_$namespace_"""") @@ -51,4 +57,4 @@ ClassMethod setup( Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "setup") } -} \ No newline at end of file +} diff --git a/src/cls/Community/Utils.cls b/src/cls/Community/Utils.cls index ece0ccf..d3d6047 100644 --- a/src/cls/Community/Utils.cls +++ b/src/cls/Community/Utils.cls @@ -17,6 +17,10 @@ ClassMethod setup(globalPath As %String = "") As %Status return sc } + write "Enabling iKnow",! + set sc=..enableIknow() + return:$$$ISERR(sc) sc + write "Building indices", ! set sc = ..buildIndices() return:$$$ISERR(sc) sc @@ -29,6 +33,13 @@ ClassMethod setup(globalPath As %String = "") As %Status return $$$OK } +ClassMethod enableIknow() As %Status +{ + set app = $System.CSP.GetDefaultApp($znspace) _ "/" + do EnableIKnow^%SYS.cspServer(app) + return $$$OK +} + ClassMethod importXMLGlobal(globalPath As %String) As %Status { set s=##class(%Stream.FileBinaryGzip).%New() @@ -76,4 +87,3 @@ ClassMethod UpdateCubes(verbose = 1) As %Status } } -