Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7030 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi guys,

I have some very bizarre behaviour going on with a script which is based on accounts/privileges.

Basically I have two privilege sets (apart from moi (admin)- [color:red]CurrentUser and [color:red]accounts. In this instance, only accounts can run the script "process accounts".

The script starts:


if (Get ( PrivilegeSetName ) = "accounts" or Get ( AccountName ) = "admin")

Here's where it gets bizarre - If I have the tickbox set to "Run Script with Full Access Privileges" it won't work for accounts. If I have it deselected it does. Problem is, that the "else" if the user is not accounts now won't work with this tickbox deselected. I have changed the get(privilegeset) to a global field to no luck either. Adding the get(accountname) and listing out the account users individually works :crazy:

As I type this, I'm thinking of going away and putting the "else" part of the script as a separate script altogether (with full access privileges) and it will thus become "else run this other script"

Any other ideas?

Posted

Ok I've separated it into 2 scripts (else being second script) and it works perfectly.

Does anyone else concur that it's a bug.. or am I missing something?

Posted

Hi Klwiora,

THis is expected behavior. When you click the "run will full access" checkbox, and do a test for privledge set, the value returned is "[FullAccess]". I banged my head against a wall for hours until I figured out this one. Hope this helps.

DOn

  • 2 weeks later...
Posted

Yup, FileMaker actually changes the current privilege set to [Full Access] when have the box checked in a script. I would rather they would run the script with full access privileges without changing the current privilege set. The way it is now, you can't test for privilige set, as you found out, of the current user in a script set to run with full privileges without setting a global prior to running the script or passing the current user's privilege set as a script parameter.

This topic is 7030 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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