The ideal number of table permissions to assign for your users is zero. Permissions should be granted upon sign-in based on the application used for access. For web applications, we have a simple way of doing this by appointing application roles, matching roles, and required resources in the System Management Portal.

ODBC and JDBC connections present a different problem, however, especially when third-party applications are involved. As providers of an ERP system, our customers often wish to be able to employ various software packages to integrate with or report on their data. Many of these programs are capable of running any kind of query. Yet, letting them do that can be devastating to a customer’s data.

3 0
2 177

Here in %SYS, we have already examined users, resources, and roles. Now that we know how to set all of that up, we should give it a purpose. Next we will talk about applications! As you may expect, we will see various identical class methods defined here that we have seen in the previous classes. However, some of them will have some tiny yet significant differences.

5 1
2 288

We are looking at what we need to do to migrate from our current usage of Zen reports to InterSystems Reports. One of the hurdles for us is figuring out ways to interact with InterSystems reports programmatically from ObjectScript routines. There is a Java API for it, but it is possible to generate a report from InterSystems reports to a stream object in ObjectScript without diving into Java by using a %Net.HttpRequest. Here is a code example, followed by an explanation:

1 0
0 125

Is there a way to add specific table permissions to a security role programmatically? I'm working on scripting some of the initial setup work when we sell certain add-ons to our software, and I see how I can assign resources to a role and give it a description, but I don't see how I tell it that this role gives the user, for example, SELECT privileges only on the invoices table, or SELECT, INSERT, UPDATE, and DELETE.

0 1
1 194

In Cache 2018, we were using a macro in a query that looked like this:

select $$GetExtraSQL^GetExtra('B',bddtl.odnumb,bddtl.odsnum,bddtl.oddsc1) as "Description", * from sqluser.bddtl

We could save that query as a view, and there was no problem with it.

In IRIS, if we put that query into SQL in the management portal, it still works, but if we save that query as a view, when we try to run a query on that view, we get a big error message:

0 1
0 241

Has anyone had any success reading barcodes from PDFs or images in a Cache/IRIS application? I've been looking at some possible solutions for this, including the open source ZXing libraries. I know we have the ability to create them in Zen and Intersystems Reports, but as far as I know, there's nothing built in to actually read data from a barcode. If anyone has suggestions on how to go about this, I'd love to hear them.

0 2
0 269

Is there a way for us to restrict user's ODBC permissions based on what program they're running on a client?

For example, we have some older Windows apps (.exe) that are a regular part of our software package which require the user to be able to select, insert, update, and delete. Some of our users are also using other third-party apps to connect (mostly reporting tools) but we only want them to be able to select unless we've approved the exe. Is there a way to do that?

These are not applications that were developed using CacheDirect.

0 6
0 283

Is there a way, for testing purposes at least, to change a CSP session over to a different user? We have a lot of things in our system that are allowed or restricted based on the user login, so it would be useful for me to be able to occasionally run as a different user to see how things look and work for them. I've tried using the %CSP.Session.Login function, but that still shows the CSP session as being from the original user, not the one I've switched to.

0 3
0 282

Pouring The Coffee: Creating and scheduling a task

Don't you wish a fresh, hot cup of coffee could be waiting for you right when you get into the office? Let's automate that!

Cache and IRIS come with a built-in Task Manager, which should have a familiar feel to those used to using the Windows task scheduler or using cron on Linux. Your user account will need access to the %Admin_Task resource to use it, and you can access it in the management portal under System Operation -> Task Manager. When first installed, there are roughly 20 types of task that you can schedule.

10 7
4 1.2K

If I open a terminal and type the following commands, sc is an error:

set validator = "sc = ##class(%Library.Numeric).IsValid(""BLAH"")"
set @validator
write sc

At the end, when I write sc I get:

0 L'BLAH9
             DOCXT010,#e^zIsValid+1^%Library.Numeric.1^1e^^^1

However, if I call the following class method using the arguments "%Library.Numeric" and "BLAH", sc is undefined

0 12
0 369

I'm trying to set up VS Code for ObjectScript using the instructions found here. I've got both Cache 2018.1.2.309.0 and IRIS 2020.1.0.215.0. When I try to connect to either one of them the connection fails, and I get a notification in the bottom right corner that says "Unexpected token < in JSON at position 0". I've checked the JSON settings file that VS Code uses, and they're fine and formatted properly. All of the settings I've entered are correct.

0 20
0 4.8K