babelfish-for-postgresql / babelfish_extensions

Babelfish for PostgreSQL provides the capability for PostgreSQL to work with applications written for Microsoft SQL Server. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query and procedural language, so you don’t have to switch database drivers or rewrite all of your application queries.
https://babelfishpg.org/
Apache License 2.0
274 stars 93 forks source link

Restrict DROP USER/ROLE from non-dbo user (#2859) (#2864) #2881

Closed anju15bharti closed 1 month ago

anju15bharti commented 1 month ago

Description

Cherry Picked from 2864

With this commit, Only dbo and members of db_owner will have the permission to drop user/role. Additionally, this restricts dropping internal database principal such as dbo and db_owner, it restricts dropping non-Babelfish roles from TDS endpoint.

Task: BABEL-5173

Signed-off-by: Shalini Lohia lshalini@amazon.com

Issues Resolved

BABEL-5173

Test Scenarios Covered

Check List

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 10555175156

Details


Totals Coverage Status
Change from base Build 10383171889: 0.01%
Covered Lines: 42327
Relevant Lines: 57890

💛 - Coveralls