Add support for windows roles in T-SQL IS_MEMBER()
Description
This commits adds support in T-SQL IS_MEMBER() function to show membership information for windows roles. The re-implemented IS_MEMBER() function relies on views sys.login_token and sys.user_token to see if current session user is member of a given role. The sys.user_token view has also been modified as part of this commit to show all the roles current_user is member of.
Task: BABEL-4822 Signed-off-by: Sharu Goel [email protected]
Test Scenarios Covered
-
Use case based - Yes
-
Boundary conditions - N/A
-
Arbitrary inputs - N/A
-
Negative test cases - N/A
-
Minor version upgrade tests - N/A
-
Major version upgrade tests - N/A
-
Performance tests - N/A
-
Tooling impact - N/A
-
Client tests - N/A
Check List
- [x] Commits are signed per the DCO using --signoff
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.
Pull Request Test Coverage Report for Build 9937569111
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 73.431%
| Totals | |
|---|---|
| Change from base Build 9935995156: | 0.0% |
| Covered Lines: | 42178 |
| Relevant Lines: | 57439 |
💛 - Coveralls
Changes looks good! Any performance implication of current implementation?
Tried with 100 users and didn't see any noticeable degradation.