Filemaker Pro defines two ways to get privilege information inside a Calculation step:
Get(CurrentExtendedPrivileges) and Get(AccountExtendedPrivileges)
The difference in the descriptions for the two functions is subtle (emphasis mine):
CurrentExtendedPrivileges: Returns a list of keywords, based on the account used to evaluate this calculation, for the enabled extended privileges.
AccountExtendedPrivileges: Returns a list of keywords, based on the account used to open the file, for the enabled extended privileges.
The wording implies that there is some way to evaluate the calculation using an account other than the one used to open the FM database file, kind of like the su
command under linux. However, I cannot find how to do that in the FM help file.
The arguments to the two functions are the same - it doesn't appear that CurrentExtendedPrivileges
takes an account name to be used for evaluation. So there must be some other script or calculation function that can be used to change the current account used for evaluation.
A script can be set to always run with full access privileges, regardless of the account calling the script - see the "Running scripts with full access privileges" part here: https://help.claris.com/en/pro-help/content/creating-editing-scripts.html.
During the execution of such script, there may be a difference between the results returned by the two functions. The help pages for both functions refer to exactly such situation:
Notes
- If you are logged in and running a script that is set to run with full access privileges, Get(AccountExtendedPrivileges) returns the
extended privileges for your account access, but
Get(CurrentExtendedPrivileges) returns the extended privileges for
the Admin account.
https://help.claris.com/en/pro-help/content/get-currentextendedprivileges.html
Example 2
If you are logged in and running a script with full access privileges, Get(AccountExtendedPrivileges) returns the extended privileges for your account access. (By contrast, Get(CurrentExtendedPrivileges) returns the extended privileges for the Admin account.)
https://help.claris.com/en/pro-help/content/get-accountextendedprivileges.html
Note that the same difference exists between the Get(AccountPrivilegeSetName)
and Get(CurrentPrivilegeSetName)
functions.