kiwiora Posted August 12, 2005 Posted August 12, 2005 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 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?
kiwiora Posted August 12, 2005 Author Posted August 12, 2005 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?
Dr. Don Levan Posted August 12, 2005 Posted August 12, 2005 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
kiwiora Posted August 16, 2005 Author Posted August 16, 2005 Thanks Levandon - now atleast I know i'm not going insane!!
Matt Klein Posted August 24, 2005 Posted August 24, 2005 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.
Recommended Posts
This topic is 7382 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 accountSign in
Already have an account? Sign in here.
Sign In Now