8.1.1.5 The Schema Privileges Panel

8.1.1.5.1 Adding Roles
8.1.1.5.2 Adding Users

The Schema Privileges panel has the following sections, used to create users for your schemata and to define roles —:

The following image displays the Schema Privileges section of the MySQL Model tab.

Figure 8.4 Roles and Privileges

Roles and privileges

8.1.1.5.1 Adding Roles

To add a role, double-click the Add Role icon. This creates a role with the default name role1. Right-clicking a role opens a pop-up menu with the following items:

  • Cut 'role_name': Cuts the role

  • Copy 'role_name': Copies the role

  • Edit Role...: Opens the role editor

  • Edit in New Window...: Opens the role editor in a new editor window

  • Delete 'role_name': Removes the role

  • Copy SQL to Clipboard: Currently not implemented

To rename a role, click the role name. Then you will be able to edit the text.

All roles that have been defined are listed under Roles on the left side of the role editor. Double-clicking a role object opens the role editor docked at the bottom of the page.

Figure 8.5 Role Editor

Role editor

Select the role to which you wish to add objects. You may drag and drop objects from the Physical Schemata to the Objects section of the role editor. To assign privileges to a role, select it from the Roles section, then select an object in the Objects section. In the Privileges section, check the rights you wish to assign to this role. For example, a web_user role might have only SELECT privileges and only for database objects exposed through a web interface. Creating roles can make the process of assigning rights to new users much easier.

8.1.1.5.2 Adding Users

To add a user, double-click the Add User icon. This creates a user with the default name user1. Double-clicking this user opens the user editor docked at the bottom of the application.

In the User Editor, set the user's name and password using the Name and Password fields. Assign one role or a number of roles to the user by selecting the desired roles from the field on the right and then clicking the < button. Roles may be revoked by moving them in the opposite direction.

Right-clicking a user opens a pop-up menu. The items in the menu function as described in Section 8.1.1.5.1, “Adding Roles”.