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

Get ( CurrentPrivilegeSetName ) = "[Full Access]"


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

Recommended Posts

Posted

I have a script that is triggered by a button. I put an if statement in the script so the script would only run for users with full access.

see attachment Exp1

The scripts fires for all users no matter what the privilege set. (I have limited record access to other users, However I wanted the script not to fire so this window would not open)

On the other hand

when I use the script (see attachment exp2)

That script worked for only those with privilege set abbotts. The behavior I would expect.

The issue is "[Full Access]" vs a custom privilege set name.

When I first created this script (possibly back in FM9) it worked as expected using the first example.

Am I missing something here? I read kb7161 but that referred to extended privileges.

I thought this was a change in 11 however 10 and 11 behave the same.

Any thoughts on this???

It seams the work around would be to create a privilege set name for admin. However I cannot access manage database under any privilege set other than [Full Access].

Exp1.jpg

exp2.jpg

Posted

Is there a difference in the state of the checkbox "Run script with full access privileges" between the two scripts?

My guess is that the first example had the box checked and you would want it unchecked.

Posted

If a script is set to Run script with full access then that is exactly what it does. This confers power onto the script, not the user.

Prior to version 11 you could pass a parameter into the script with information about the active Account's Privilege Set.

The change in FileMaker® Pro 11 is that you can test for Get(AccountPrivilegeSet) to see the Privilege Set of the Account that actually opened the file.

I would recommend reading a new White Paper on Security Schema Changes in FileMaker 11 that you can download from here.

Steven

Posted

Is there a difference in the state of the checkbox "Run script with full access privileges" between the two scripts?

Yes it runs with full access. I did an experiment and without full access and it behaves the same.

I have read the white paper, but I will read it again tomorrow at work. As far as I can tell I am testing for the privilege correctly in the script. The test fails or behaves odd when [Full Access] is used, but works properly when custom privilege set is used.

I say odd because the script fires when the test should fail. (The user is not full access) If anything I would expect the non admin menu set to install which is the default for the file.

btw old advanced man - I saw you at pause on error and meant to thank you for all the help you give us lower level people. I missed my opportunity and time was gone before I new it.

Soooo thanks for all the help you give us lower level people.

Posted

The Privilege Set Name isn't "Abbotts" in this case; it's "[Full Access]." It will always be that when the script is running with full access privileges.

Use Get(AccountPrivilegeSet Name) to get the Privilege Set associated with the Account that actually opened the file.

Thanks for your kind words of appreciation for my efforts.

Steven

Posted

Finally got it. Must be a red letter day when something finally gets through my thick skull.

Works great now.

This topic is 5353 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.