![]() |
Next Page |
| Contents > Protecting databases with accounts and privilege sets > Creating and managing privilege sets > Editing record access privileges |
|
|
| Editing record access privileges |
| Privilege sets can limit access to records in a file. For a file, you can set: |
| Privileges for all tables: you can limit whether a privilege set allows creating, editing, and deleting records in all the tables in a file. |
| Custom privileges for individual tables: you can set individual record access limits for each table. For example, the privilege set can limit the ability to: |
|
|
|
| You can only set record access privileges for tables defined in the current file. If the file contains relationships to tables in other files that you want to protect, you need to create accounts and privilege sets in the other files to protect those tables. For more information, see About protecting databases. |
| To edit record access privileges: |
| 1. | Start editing a new or existing privilege set. |
|
|
For more information, see Creating new privilege sets or Editing existing privilege sets. |
| 2. | In the Edit Privilege Set dialog box, choose one of the following options from the Records list: |
|
|
|
| 3. | In the Custom Record Privileges dialog box, select one or more tables for which you want to edit custom privileges. (Or select Any New Table to set privileges for any table created later.) |
|
|
|
|
| 4. | To set custom privileges for viewing, editing, creating, and deleting records, choose one of the following options from the View, Edit, Create, and Delete lists in the Set Privileges area: |
|
|
|
|
|
Note Avoid creating inconsistent combinations of view, edit, create, and delete privileges. For example, you most likely do not want to permit users to delete records that they cannot view. |
| 5. | To limit access or modification of certain fields within a table, continue with the next step. Otherwise, skip ahead to step 9. |
| 6. | Select the table that contains the fields for which you want to limit access. Then, for Field Access, choose Limited. |
| 8. | Click OK. |
| 9. | Click OK. |
|
|
You see the Edit Privilege Set dialog box. |
| 10. | Manage any other privileges for the privilege set. |
|
|
For details on the different privileges you can define, see: |
|
|
|
|
|
| 11. | When you've finished editing this privilege set, click OK. |
| 12. | In the Manage Accounts & Privileges dialog box, do one of the following: |
|
|
| Notes |
| In the Custom Record Privileges and Custom Field Privileges dialog boxes, you can order the displayed list of tables or fields by clicking one of the column headings. To switch between ascending and descending order, do one of the following: |
|
|
| If you prohibit creating records in a file or table, then duplicating records is prohibited as well. |
| Users that cannot view certain records can still browse these records, but the user will see <No Access> instead of the field data within each record. |
| Many features in FileMaker Pro are affected when you limit access to records, fields, and tables within a file. The following table summarizes the effects for some features. |
|
|
|
| Entering a formula for limiting access on a record-by-record basis |
| To allow or prohibit record viewing, editing, and deleting privileges to certain records within a table, you need to specify a Boolean calculation that determines whether the privilege is permitted. For each record in the database, access is allowed when the calculation evaluates to True or to a non-zero result, and access is prohibited when the calculation evaluates to False or zero. Here are two examples: |
| To limit access to only those records created by the current account: Define a text field named Record_Created_By, and set the auto-enter option for the field to automatically enter the account name when the record is created. (For details, see Defining automatic data entry.) Then use the following calculation when defining custom record access privileges: |
|
|
Record_Created_By = Get(AccountName) |
|
|
The user will only have Browse access to records for which the above calculation evaluates as True. |
| To limit access to only those records created on the current date: Define a date field named Record_creation_date, and set the auto-enter option for the field to automatically enter the creation date when the record is created. (For details, see Defining automatic data entry.) Then use the following calculation when defining custom record access privileges: |
|
|
Record_creation_date = Get(currentDate) |
|
|
The user will only have Browse access to records for which the above calculation evaluates as True. |
| Tip If you specify a calculation to prohibit viewing of certain records within a table, in most cases you should use the same calculation to prohibit editing and deleting of the same types of records. Otherwise, you may inadvertently allow users to edit or delete records that they cannot view. |
| Notes |
| The Boolean calculation that determines record access privileges can have unexpected results, particularly if it is based on a user-editable field. For example, it's possible for a user with access privileges for only certain records to inadvertently deny themselves access to a record after editing it. The user could make a change to a record's content that changes the result of the Boolean record access calculation so that it evaluates to False; then that user would no longer be able to view, edit, or delete the record once he or she exits that record. Because changes are committed as soon as a user exits a record, a user making changes of this type will not be able to return to the record. (In most cases, you should base record access calculations on fields that are not directly editable by users, such as auto-entered fields that contain account names, creation dates, and modification dates.) |
|
|
Also, if the file is shared and the Boolean calculation that determines record access privileges contains one or more global fields, you may be able to improve network performance by moving some global fields into a separate table. For more information, see the Notes section in Defining global fields (fields with global storage). |
| To fully support multiple windows that have their own found sets, summary values are a part of the found set. (There is no single summary value for a single file as in FileMaker Pro 6 and earlier versions.) A record may appear in multiple windows, and each window has its own found set and sort order. For these reasons, do not base privilege calculations on summary or Get functions that rely on values using a particular found set. |
|
|
| Contents > Protecting databases with accounts and privilege sets > Creating and managing privilege sets > Editing record access privileges | Next Page |