Skip to content

Add support for custom roles and role permissions management in pgAdmin. #7310#8631

Merged
akshay-joshi merged 2 commits intopgadmin-org:masterfrom
adityatoshniwal:7310-custom-roles
Apr 15, 2025
Merged

Add support for custom roles and role permissions management in pgAdmin. #7310#8631
akshay-joshi merged 2 commits intopgadmin-org:masterfrom
adityatoshniwal:7310-custom-roles

Conversation

@adityatoshniwal
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@akshay-joshi akshay-joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GUI Review Comments:

  1. Permission pop-up should be worked from the context menu, and buttons on the Object Explorer like (Filtered Row, and View/Edit Data). Currently, it is throwing a Forbidden error.ERD for Table and ERD for Database menus also show the Forbidden message.
  2. If there is no Query Tool permission then Create Script, Generate Script(from Schema Diff) should also shown the Permission Denied pop up. In any case, if the Query Tool/PSQL tab is opened with a Forbidden message then please try to fix the issue of closing tab.
  3. If registering a new server requires permission, then removing the server should also be added, or the existing permission should be renamed "Register/Remove servers," which works for both. Please check "Copy Server" as well.
  4. Checkboxes on the permissions tab look disabled when not selected. Can we change the background color to white?
  5. The PSQL Tool is missing from the Tools permission.
  6. Please test the CLI commands to add user, external user, and all other commands.
  7. As we are using the same name for Permissions then "Perform maintenance" should be renamed to "Maintenance".
  8. Disable the Query Tool and PSQL Tool workspace if there is no permission.

Code Review Comments:

  1. Create constants/enums for all the permissions like 'tools_debugger', 'tools_backup', etc... used in the JavaScript files. Or use "class AllPermissionTypes:" if possible.
  2. Check the default permissions for Role 'User' it contains "module,............,dict,weakref,doc"
  3. Add comments in the entire code wherever you feel it's needed for other developers to understand.

@akshay-joshi akshay-joshi merged commit 7d8a915 into pgadmin-org:master Apr 15, 2025
27 of 32 checks passed
@adityatoshniwal adityatoshniwal deleted the 7310-custom-roles branch May 14, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants