Bug #104563 Schema Navigator pane not role change aware
Submitted: 6 Aug 2021 17:22 Modified: 9 Aug 2021 12:38
Reporter: Chris Elliott Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.25 OS:Windows
Assigned to: CPU Architecture:x86

[6 Aug 2021 17:22] Chris Elliott
Description:
When changing the current role for the user the Schema Navigator pane does not properly reflect potential changes in what database objects are visible or no longer visible.

How to repeat:
Create a role (a) that has no privileges to any schema.
Create a role (b) that has at least select privilege to all (%) schemas.
Grant role a to a test user account.
Grant role b to the same test user account.
Set role a to be the default schema upon login.
Login as the test user.
No schemas should be visible in the Schema Navigator pane in Workbench.
Set current role for the test user to role b.
Refresh the Schema Navigator pane.
No schemas are still visible even though the test user now has at least select privilege on all schemas.

Suggested fix:
Workbench should refresh privileges as if creating a new session when the Schema Navigator pane is refreshed.
[9 Aug 2021 12:38] MySQL Verification Team
Hello Chris Elliott,

Thank you for the bug report.
I could not repeat the issue at our end using MySQL Workbench 8.0.26 version on Windows 10.
If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Regards,
Ashwini Patil
[20 Jul 13:41] Rui Silva
I have the same issue.

Try this for reproduction:
Create user u.
Create schema sa.
Create schema sb.
Create role ra with access only to sa.
Create role rb with access only to sb.
Assign both roles to user u.
Make role ra as default role to user u.

Login to DB with user u mysql workbench.
In the same session do the following:
Check the schema pane should only show sa.
"show databases" should only list sa.
run:
set role rb;
"show databases" should only list sb.
Refreshing the schema list gives errors keeps should sa and doe snot sb.
[20 Jul 13:46] Rui Silva
I can reproduce it on version 8.0.47