O'Reilly logo

FileMaker Pro 9: The Missing Manual by Susan Prosser, Geoff Coffey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scripts and Security

Security and script writing intersect in two areas. First, you need to take into account the level of access people have, and whether or not your scripts will over-ride some or all of their privileges. (The previous section describes one way of doing so with extended privileges.) Second, FileMaker lets you automate some of the security features described earlier in this chapter with scripting. ScriptMaker has a handful of steps dedicated to security-related tasks, and this section shows you how to use them.

Detecting Privileges in a Script

The first way to handle security in your scripts is to deal with it directly. In the last section you learned how to check for extended privileges and take appropriate actions. If you want, you can check for specific privilege sets, or even specific account names.

  • To check the privilege set, use the Get ( PrivilegeSetName ) function. It returns the name of the privilege set assigned to the current user. Bear in mind that if you change the name of a privilege set, you have to modify any scripts that use this function.

  • If you must restrict an action to a particular account, use Get ( AccountName ) instead. As you probably expect, it returns the name of the account with which the user logged in. The same warning applies here: Beware of renamed accounts.

    Note

    If the user logged in with external authentication, then Get ( AccountName ) will give you their real account name in the external directory server.

  • Finally, FileMaker has one more ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required