isAuthorized Expression [error] Unknown function

Hi there.

I am bumping this topic again as I can find no resolution.

I have tried to use isAuthorized in an expression as stated can be done as of 8.0.2
https://docs.inductiveautomation.com/display/DOC80/isAuthorized

I am using 8.1.3 and this function does not even exist in the expression menus. The only thing listed under the Users category is hasRole.

If I try to use isAuthorized in an expression it errors as unknown function.

image

This previous post is the exact same problem.

Am I missing something here?

Thanks

The scope of the isAuthorized expression is restricted to Perspective sessions. I don’t even think Vision projects utilize Security Levels, and as such the functions serves no purpose in the Vision context.

Sorry I didn’t mention that I am using this in perspective, which is why I’m confused why this is not working.

OK so I just figured something out. I was trying to use isAuthorized in an Expression Tag. It is not available. I guess I should have realized that since tags aren’t specific to either Vision or Perspective.
I created an expression binding in Perspective and was able to use the isAuthorized function.
A little ambiguous but I got it to work. I assumed an expression function was an expression function and should be able to be used in any expression.

Solved

1 Like

If you think about login security in general, and the all-the-time-regardless-of-users nature of gateway tags (all types, not just expression tags), it'll make more sense. This type of scope-dependence permeates Ignition, so you might consider it first when something doesn't work the way you assume.