Hello,
I am working on Ensemble 2017.2.1 .
I need to export my security settings into an extern database, in order to make a report.
I've created a Business Operation with an SQL Adapter into a Namespace, but I don't know how to get every security data from "%SYS" Namespace ( SQLPrivileges , Resources , Roles , Services , Users ... ).
I dont't want to use the terminal and the ^SECURITY routine, because i don't want to store a XML file on the server.
I tried to create a method where I can use the (Security.System).ExportAll command in order to use the stream , but it doesn't work because the "ExportAll" method asks for a filePath instead of a Stream .
This is a part of my code :
SET $NAMESPACE="%SYS"
set xmlFile = ##class(%Stream.FileBinary).%New()
do ##class(Security.System).ExportAll(.xmlFile,.nbRows)
Do you know any method to get every Security settings without exporting a file ?
Do you think creating a proxy class can be a good idea to get every security data from the "%SYS" Namespace ? ( this seems a bit dangerous )
Thank you in advance.
Best regards,
Lucas BOURRE
</body></html>