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

feat(frontend): add permission check in revoke #3512

Merged
merged 7 commits into from
Jun 29, 2022
Merged

Conversation

cnissnzg
Copy link
Contributor

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

Check whether revoker has permission to do the revoke. Record session user and granted by in proto then use it in meta.
https://www.postgresql.org/docs/current/sql-revoke.html

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

@cnissnzg cnissnzg changed the title feat(frontend): add permission check in provoke feat(frontend): add permission check in revoke Jun 28, 2022
@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #3512 (1f35979) into main (89ce3ed) will increase coverage by 0.00%.
The diff coverage is 76.14%.

@@           Coverage Diff            @@
##             main    #3512    +/-   ##
========================================
  Coverage   74.48%   74.48%            
========================================
  Files         771      771            
  Lines      108216   108317   +101     
========================================
+ Hits        80603    80683    +80     
- Misses      27613    27634    +21     
Flag Coverage Δ
rust 74.48% <76.14%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/frontend/src/user/user_service.rs 10.76% <0.00%> (-1.74%) ⬇️
src/meta/src/rpc/service/user_service.rs 5.40% <0.00%> (-0.37%) ⬇️
src/rpc_client/src/meta_client.rs 0.00% <0.00%> (ø)
src/meta/src/manager/user.rs 88.66% <95.89%> (+1.01%) ⬆️
src/frontend/src/handler/handle_privilege.rs 68.33% <100.00%> (+1.00%) ⬆️
src/frontend/src/test_utils.rs 92.47% <100.00%> (+0.04%) ⬆️
src/connector/src/filesystem/file_common.rs 80.35% <0.00%> (-0.45%) ⬇️
src/frontend/src/expr/utils.rs 98.99% <0.00%> (+0.50%) ⬆️
src/meta/src/manager/id.rs 96.06% <0.00%> (+0.56%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@cnissnzg cnissnzg requested a review from yezizp2012 June 28, 2022 04:34
Copy link
Contributor

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

Generally LGTM

@cnissnzg cnissnzg merged commit 41f05f7 into main Jun 29, 2022
@cnissnzg cnissnzg deleted the yifeng/RevokePrivilege branch June 29, 2022 03:25
huangjw806 pushed a commit that referenced this pull request Jul 5, 2022
* add permission check in provoke

* fix same user

* alter option in user.proto

* fix
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.

None yet

2 participants