Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user grant privileges #2797

Merged
merged 1 commit into from
Nov 16, 2021
Merged

user grant privileges #2797

merged 1 commit into from
Nov 16, 2021

Conversation

junnplus
Copy link
Contributor

I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/

Summary

Summary about this PR

Changelog

  • Improvement

Related Issues

Fixes #issue

Test Plan

Unit Tests

Stateless Tests

@databend-bot
Copy link
Member

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2021

Codecov Report

Merging #2797 (ddd3384) into main (a1f2078) will increase coverage by 0%.
The diff coverage is 85%.

Impacted file tree graph

@@          Coverage Diff           @@
##            main   #2797    +/-   ##
======================================
  Coverage     69%     69%            
======================================
  Files        597     603     +6     
  Lines      32242   32531   +289     
======================================
+ Hits       22312   22583   +271     
- Misses      9930    9948    +18     
Impacted Files Coverage Δ
common/planners/src/plan_node.rs 36% <0%> (-1%) ⬇️
common/planners/src/plan_rewriter.rs 51% <0%> (-1%) ⬇️
query/src/interpreters/interpreter_factory.rs 33% <0%> (-2%) ⬇️
query/src/sql/sql_parser_test.rs 80% <76%> (-1%) ⬇️
...ry/src/interpreters/interpreter_grant_privilege.rs 80% <80%> (ø)
query/src/sql/sql_parser.rs 81% <84%> (+<1%) ⬆️
common/planners/src/plan_grant_privilege.rs 87% <87%> (ø)
query/src/sql/plan_parser.rs 74% <88%> (-1%) ⬇️
query/src/users/user_mgr_test.rs 94% <92%> (-1%) ⬇️
query/src/users/user_mgr.rs 82% <93%> (+1%) ⬆️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1f2078...ddd3384. Read the comment docs.

@junnplus junnplus force-pushed the grant-user branch 4 times, most recently from 7b0c513 to 8ed2282 Compare November 16, 2021 04:01
@junnplus junnplus marked this pull request as ready for review November 16, 2021 04:37
@junnplus junnplus requested a review from BohuTANG as a code owner November 16, 2021 04:37
self.privileges.contains(privilege)
}

pub fn set_all_privileges(&mut self) {
self.privileges |= ALL_PRIVILEGES;
}
}

impl ops::BitOr for UserPrivilege {
Copy link
Member

Choose a reason for hiding this comment

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

👍

@BohuTANG
Copy link
Member

/lgtm

Neat and powerful test, thank you @junnplus

@BohuTANG BohuTANG merged commit 8aabb21 into databendlabs:main Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User grant privileges
4 participants