July 28, 201312 yr Hi, For some reason the script below that I have as an on open script for my file is not working in regards to hiding and locking the status toolbar from only those with Full Access. Am I missing something obvious? It does hide it, but the lower privilege user can still go to View > Status Toolbar and open it. I thought "lock" was suppose to prevent this? # # If [ Get ( CurrentPrivilegeSetName ) = "[Full Access]" ] Perform Script [ “Unlock_forDevelopment” ] Else # # restrict other users from seeing the toolbar Allow Formatting Bar [ Off ] Show/Hide Toolbars [ Lock; Hide ] End If # # Set default layout Perform Script [ “__Default_Layout” ] # # Set initial window position Perform Script [ “__Default_Window” ] # # Restore Globals as default settings Perform Script [ “__Restore_Globals” ]
July 28, 201312 yr I think it might help to see the sub scripts. The first part of your script seems to do what you want but I would carefully examine the scripts that are called in the latter part.
July 28, 201312 yr Get ( CurrentPrivilegeSetName ) evaluates to the privilege set running the script which might be set to full access (using the checkbox at the bottom). I believe you want Get ( AccountPrivilegeSetName ) which checks for the USER'S privilege set. If this isn't the issue then it is unusual since once the toolbar is hidden and locked, it should stay that way not matter which layout you go to. I tested and just confirmed it works as expected on 10.8.4 with 12.0v4 but it might act differently on other versions.
July 28, 201312 yr Author Thanks LaRetta, I did what you suggested and it still didn't work, but your mentioning the "running the script which might be set to full access" made me check that. I did have it checked on some of the subscripts, and once I deselected that it works correctly now.
Create an account or sign in to comment