Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

RE: Accounts & Privileges

Featured Replies

Hi All,

I disabled some of my scripts using Accounts & Privileges. Scripts are attached to a button, when ever i click the button a message pops up.

Picture3.png

My question is, how can i disable the error message? I tried putting Set Error Capture[on] to the script but error message still pops up.

Thanks all.

By removing access to the script in Accounts & Privileges (A&P) you removed access to the script (yeah ;)-). So you can't test anything within the script nor suppress the message, you don't have access to even start the script.

What you can do is create another script to run that script, which they do have access to, and do your tests first, before calling the original script as a subscript (using the Perform Script step). Of course by that time it doesn't much matter anymore whether you've turned off access in A&P.

Turning off access to scripts in A&P is a great feature for scripts that are (were) visible in the Scripts menu, as it removes them from visibility as well. But it's not so great for buttons, unless you need that extra level of security, as you can just put the tests for access within the script itself instead.

Be aware that scripts with the option checked (lower left), [x] Run with Full Access, with have a privilege set of "Full Access", defeating tests for privileges within the script.

  • Author

Hi Fenton,

I followed your suggestion and it worked fine here's sample of the script.

Picture3-1.png

Question again, what if I have to add another privilege?

Get(PrivilegeSetName)="201"

what is the syntax for adding condition Ex. ="201" "Accounting" etc...

Thanks again Fenton for the reply

Be aware that scripts with the option checked (lower left), [x] Run with Full Access, with have a privilege set of "Full Access", defeating tests for privileges within the script.

Actually not. You just have to call the Privilege Set information before the script fires, usually by attaching a parameter to the calling object that returns:

Get(PrivilegeSetName)

Pass that parameter to the script and you can then perform the test.

HTH

Steven

Yes, Steven's right (of course ;)-). I wasn't meaning to say that there were not ways to avoid getting caught out by [x] Full Access, I was just warning about it (and being too lazy to say how to get around it). The Script Parameter is a good one (I'll remember that), if it's button driven, or called by another script. If it's a menu driven script, you can capture the privilege set in a "wrapper" script before calling the Full Access script.

As far as adding another test, you just add it, like in any other calculation.

If [ Get ( PrivilegeSetName ) = "donuts" or Get ( PrivilegeSetName ) = "coffee" ]

There is also the "negative" version of the above:

If [ Get ( PrivilegeSetName ) ≠ "Admin" and Get ( PrivilegeSetName ) ≠ "Manager" ]

Notice the negative one uses "and".

I have found that it's often better in the long run to test against the "higher" level privilege sets, than it is to test against the "lower" level ones. Because the higher ones are often fewer and change less often.

[P.S. I highly recommend a text tool like TextExpander or Spell Catcher, to type those long function names for you :-]

  • Author

Thanks for the reply, hope you don't get tired of helping us less fortunate..hehe

Thanks again u 2

Not to worry, Fenton. If I am right on somethng, it's usually because I have been wrong before on the same thing...often more than once. ;)>)

Many thanks for all your contributions to this Forum.

Steven

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.