Database Reference
In-Depth Information
Figure 18-21. When someone tries something your security setup doesn't allow, he sees this mes-
sage—even if it's a script that's breaking the rules. Unfortunately, FileMaker doesn't tell him—or
you—what the script is trying to do.
Running Scripts with Full Access Privileges
Sometimes you want the script to do its duty even though the user doesn't have the necessary
privileges. For example, you may want to remove an accountant's ability to delete invoice re-
cords since she's not supposed to delete any orders. But you may still want to let her run a
script that finds old completed invoices, exports them to an archive and then deletes them.
Since this script is careful to delete only invoices that are ready to go, the accountant can
safely run it when necessary.
For those kinds of circumstances, FileMaker lets you specify when a script should run with
full access privileges for anyone . In other words, the script overrides the normal restrictions
you set up in the user's privilege set. At the bottom of the Edit Script dialog box, just turn on
the “Run script with full access privileges” option. With this option turned on, the script duti-
fully deletes the invoices even though the accountant running it isn't allowed to delete re-
cords in the Invoice or Line Item tables with her account's privilege set.
Even when you set a script to run with full access privileges in this way, you can still prevent
some folks from running it by switching it to “no access” in the Custom Script Privileges
window for a privilege set. You can also make the script check for an extended privilege and
then take appropriate actions for different people.
Managing Security with Scripts
The Edit Script window has an entire section called Accounts. It includes six steps that give
you some control over the security system from your scripts. All these steps require full ac-
cess privileges to work. If you don't manage a lot of accounts in your database, then you
might not find much use for these steps. But if you have a large organization, or one that has
lots of turnover—like a school system that's constantly adding new teachers or graduating a
whole class of students who no longer need access to databases for classwork—these script
steps can save tons of time and effort.
Search WWH ::




Custom Search