2016-05-27 11:13:36 -05:00
|
|
|
.. _grant_wizard:
|
|
|
|
|
2018-06-15 03:14:12 -05:00
|
|
|
*********************
|
|
|
|
`Grant Wizard`:index:
|
|
|
|
*********************
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
The *Grant Wizard* tool is a graphical interface that allows you to manage the
|
|
|
|
privileges of one or more database objects in a point-and-click environment. A
|
|
|
|
search box, dropdown lists, and checkboxes facilitate quick selections of
|
|
|
|
database objects, roles and privileges.
|
2018-01-11 10:58:30 -06:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
The wizard organizes privilege management through a sequence of windows:
|
2021-09-20 02:32:41 -05:00
|
|
|
*Object Selection*, *Privileges Selection* and
|
|
|
|
*Review Selection*. The *Review Selection* window
|
2019-03-08 09:29:05 -06:00
|
|
|
displays the SQL code generated by wizard selections.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
To launch the *Grant Wizard* tool, select a database object in the *pgAdmin*
|
|
|
|
tree control, then navigate through *Tools* on the menu bar to click on the
|
|
|
|
*Grant Wizard* option.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
|
|
|
.. image:: images/grant_wizard_step1.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Grant wizard step one page
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2021-09-20 02:32:41 -05:00
|
|
|
Use the fields in the *Object Selection* window to select the
|
2019-03-08 09:29:05 -06:00
|
|
|
object or objects on which you are modifying privileges. Use the *Search by
|
|
|
|
object type or name* field to locate a database object, or use the scrollbar
|
|
|
|
to scroll through the list of all accessible objects.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Each row in the table lists object identifiers; check the checkbox in the left
|
|
|
|
column to include an object as a target of the Grant Wizard. The table
|
|
|
|
displays:
|
2016-05-27 11:13:36 -05:00
|
|
|
|
|
|
|
* The object type in the *Object Type* field
|
|
|
|
* The schema in which the object resides in the *Schema* field
|
2018-01-11 10:58:30 -06:00
|
|
|
* The object name in the *Name* field.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2021-09-23 05:47:39 -05:00
|
|
|
Click the *Next* button to continue, or the *X* button to close the wizard
|
2019-03-08 09:29:05 -06:00
|
|
|
without modifying privileges.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
|
|
|
.. image:: images/grant_wizard_step2.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Grant wizard step two page
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2021-09-20 02:32:41 -05:00
|
|
|
Use the fields in the *Privileges Selection* window to grant
|
2019-03-08 09:29:05 -06:00
|
|
|
privileges. If you grant a privilege WITH GRANT OPTION, the Grantee will have
|
|
|
|
the right to grant privileges on the object to others. If WITH GRANT OPTION is
|
|
|
|
subsequently revoked, any role who received access to that object from that
|
|
|
|
Grantee (directly or through a chain of grants) will lose thier privileges on
|
|
|
|
the object.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2016-09-02 09:27:10 -05:00
|
|
|
* Click the *Add* icon (+) to assign a set of privileges.
|
2016-05-27 11:13:36 -05:00
|
|
|
* Select the name of the role from the drop-down listbox in the *Grantee* field.
|
2019-03-08 09:29:05 -06:00
|
|
|
* Click inside the *Privileges* field. Check the boxes to the left of one or
|
|
|
|
more privileges to grant the selected privileges to the specified user. If
|
|
|
|
privileges have previously been granted on a database object, unchecking a
|
|
|
|
privilege for a group or user will result in revoking that privilege.
|
2019-11-25 21:03:59 -06:00
|
|
|
* The current user, who is the default grantor for granting the privilege, is displayed in the *Grantor* field.
|
2019-03-08 09:29:05 -06:00
|
|
|
* Click the *Add* icon (+) to assign a set of privileges to another role; to
|
|
|
|
discard a privilege, click the trash icon to the left of the row and confirm
|
|
|
|
deletion in the *Delete Row* dialog.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
For more information about granting privileges on database objects, see the
|
2019-03-12 09:24:46 -05:00
|
|
|
`PostgreSQL core documentation <https://www.postgresql.org/docs/current/sql-grant.html>`_.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Click the *Next* button to continue, the *Back* button to select or deselect
|
2021-09-23 05:47:39 -05:00
|
|
|
additional database objects, or the *X* button to close the wizard without
|
2019-03-08 09:29:05 -06:00
|
|
|
modifying privileges.
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Your entries in the *Grant Wizard* tool generate a SQL command; you can review
|
2021-09-20 02:32:41 -05:00
|
|
|
the command in the *Review Selection* window (see an
|
2019-03-08 09:29:05 -06:00
|
|
|
example below).
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Example
|
|
|
|
*******
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
The following is an example of the sql command generated by user selections in
|
|
|
|
the *Grant Wizard* tool:
|
2016-05-27 11:13:36 -05:00
|
|
|
|
|
|
|
.. image:: images/grant_wizard_step3.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Grant wizard step three page
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-05-27 11:13:36 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Click the *Back* button to select or deselect additional database objects,
|
|
|
|
roles and privileges.
|
2019-11-25 21:03:59 -06:00
|
|
|
* Click the *Finish* button to save selections and exit the wizard.
|