Bug report #16776
QGIS Database User Privileges/Permissions Bug
|Affected QGIS version:||2.18.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||not reproducable|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24675|
QGIS seems to use the privileges/permissions for the first database user to login when the application is started for all other database users that login.
When you create the first user connection to the database (PostgreSQL/PostGIS in this case) and you add a new connection with a different user or edit the first connection to a different user without restarting the application, QGIS uses the privileges of the first user connection for the new user connection (the privileges can be viewed from the Database Manager menu). This is likely a bug in the QGIS software as refreshing the edited connection or deleting the connection and creating a new one makes no difference.
The only way I have found around this "bug" is to restart the QGIS application before creating a new user connection or editing a connection to a different user.
This "bug" was discovered after posting the issue in the link below:
#1 Updated by Giovanni Manghi over 5 years ago
- Easy fix? changed from Yes to No
- Priority changed from High to Normal
- Assignee deleted (
#2 Updated by Giovanni Manghi over 5 years ago
- Status changed from Open to Feedback
I think I replicated correctly what you describe here and on stackexchange, and I cannot confirm the issue on 2.18.10 (if you really used 2.18.0 you must try something less obsolete). I also used postgresql/postgis for the test. If you still see the issue I would be very interested in a list of exact steps on how replicate rather than the general explanation of what you are observing.
#3 Updated by Giovanni Manghi over 5 years ago
- Resolution set to not reproducable
- Status changed from Feedback to Closed
Closing for lack of feedback, please reopen if necessary.