-
Notifications
You must be signed in to change notification settings - Fork 420
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: support custom ownership transfer for grants #1743
Conversation
I think it would make more sense to have an dedicated |
@sfc-gh-swinkler Apologies for the delay. Merge conflicts have been resolved.
I agree but I found that this PR would be the least painful and disruptive way of implementing something that will unblock our project. I'll be happy to contribute to the discussion when I can.
I have noted this if I need to implement new features in the future but I suggest continuing with the v1 design for this particular PR as it's meant to be more of a bandaid than a permanent fix. The aforementioned re-design of |
@@ -13,7 +13,6 @@ import ( | |||
|
|||
var validUserPrivileges = NewPrivilegeSet( | |||
privilegeMonitor, | |||
privilegeOwnership, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove privilegeOwnership
as it should already be serviced by UserOwnershipGrant
resource.
Leaving it in may contribute to confusion.
True, lets revisit this in the future. For now, i agree a bandaid solution is sufficient. |
@hexDoor thank you for your contribution! |
optional
schema variablerevert_ownership_to_role_name
which allows granular control over which role ownership will transfer to when destroying generic grants (including destruction during update) such as the following:database_grant
external_table_grant
file_format_grant
function_grant
integration_grant
masking_policy_grant
materialized_view_grant
pipe_grant
procedure_grant
row_access_policy_grant
schema_grant
sequence_grant
stage_grant
stream_grant
table_grant
tag_grant
task_grant
view_grant
warehouse_grant
Note: Grants that do not seem to have a concept of
ownership
such asresource_monitor_grant
do not gain this optional variable.Add
RevokeOwnership
method to*GrantExecutable
interfaces and implementFix small variable naming issues
AllGrantBuilder
referred asfgb
=>agb
ExistingGrantExecutable
referred asfge
=>ege
Test Plan
References