pgadmin-org / pgadmin-org/pgadmin4

Grant Wizard does not grant priviledges to a schema

Open
#8,954 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

Describe the solution you'd like

In the Grant Wizard of pgAdmin 4, when selecting all objects within a schema (e.g., all tables, sequences, etc.), I would expect the wizard to also grant privileges on the schema itself. Currently, privileges are granted only to the individual objects within the schema, but not to the schema itself. As a result, users may still encounter permission errors such as "permission denied for schema X" even after using the wizard to grant "ALL" privileges on all objects.

It would be helpful if the wizard could optionally include the schema-level privileges (e.g., USAGE) when granting permissions on all objects within a schema.

Describe alternatives you've considered

I have manually executed GRANT USAGE ON SCHEMA ... TO ... as a workaround, but this defeats the purpose of using the wizard for convenience and completeness. There is currently no option in the wizard UI to include schema-level privileges when granting permissions on contained objects.

Additional context

This behavior may be surprising to users who assume that "all objects" includes the schema itself. Improving this would make the permission granting process more intuitive and reduce confusion for administrators.

Example error after using the wizard:

ERROR: permission denied for schema gate
LINE 1: SELECT count(*) FROM gate.table;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Grant Wizard flow described in the issue and reproduce granting privileges on all objects within a schema. Trace how the wizard generates grants and determine where schema-level privileges can be included. Done means the wizard can grant the needed schema privilege, such as USAGE, and the reported permission error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.