Throughout this chapter we have been careful to note that security settings are specific to a single file within FileMaker. If you have a solution that spans multiple files, you will need to duplicate your account and privilege settings across those multiple files. This can become onerous when you have more than a handful of accounts or groups.
Privilege sets within FileMaker cannot be programmatically controlled. In other words, you cannot use a script to define a privilege set. You will need to create the appropriate privilege sets in each file of your solution. This is as expected: By definition each privilege set should be specific to the file in which it sits.
Accounts, on the other hand, can be managed by script, and there are some techniques you can use to simplify the management of accounts within your suite of files.
These are the Accounts script steps available to you:
Figure 12.17. The Add Account script step allows you to add internally authenticated users to a file.
To use these script steps to support work in multiple files, you will need to create a user interface that allows users to create accounts and change passwords. Note that in the dialog shown in Figure 12.17, there is a Specify button next to both the Account Name and the Password boxes.
First, create a layout (or dialog) that will ask a user for a new account name and password she wants to add to your multifile solution. You should have the user enter that information into two fields set with global storage. You will also need a pop-up menu of privilege sets available within your solution (and certainly you should feel free to omit those that are sensitive, such as [Full Access]).
Second, write a script that calls subscripts in each of your solution files. The subscript should use the Add Account script step to create the new user account. Where you need to provide an account name and password, simply reference the two global fields you had set up previously. Note that with global fields, you can add an external table occurrence from a different file and gain access to the fields as you need.
You can follow similar techniques for changing passwords, deleting accounts, and enabling them.
Part I: Getting Started with FileMaker 8
FileMaker Overview
Using FileMaker Pro
Defining and Working with Fields
Working with Layouts
Part II: Developing Solutions with FileMaker
Relational Database Design
Working with Multiple Tables
Working with Relationships
Getting Started with Calculations
Getting Started with Scripting
Getting Started with Reporting
Part III: Developer Techniques
Developing for Multiuser Deployment
Implementing Security
Advanced Interface Techniques
Advanced Calculation Techniques
Advanced Scripting Techniques
Advanced Portal Techniques
Debugging and Troubleshooting
Converting Systems from Previous Versions of FileMaker Pro
Part IV: Data Integration and Publishing
Importing Data into FileMaker Pro
Exporting Data from FileMaker
Instant Web Publishing
FileMaker and Web Services
Custom Web Publishing
Part V: Deploying a FileMaker Solution
Deploying and Extending FileMaker
FileMaker Server and Server Advanced
FileMaker Mobile
Documenting Your FileMaker Solutions