-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Redshfit: sync tables with partial select permission #40421
Redshfit: sync tables with partial select permission #40421
Conversation
" t.objectname as table," | ||
;; interestingly if you have table privilege, has_any_column_privilege is false in redshift. 1) what! | ||
" pg_catalog.has_table_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'SELECT')" | ||
" OR pg_catalog.has_any_column_privilege(current_user, '\"' || t.schemaname || '\"' || '.' || '\"' || t.objectname || '\"', 'SELECT') as select," |
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.
has_any_column_privilege
return false
if you have full select privileges :), we need to do has_table_privilege OR has_any_column_privilege
here.
also has_any_column_privilege only exists on select
and update
.
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.
this is pretty surprising so let's leave this as a comment, like I've suggested here https://github.com/metabase/metabase/pull/40421/files#r1533731501
|
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.
Looks good, just left minor suggestions
qual-mview-name | ||
qual-tbl-partial-select-name | ||
qual-tbl-partial-update-name | ||
username))))))))) |
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.
we'll need a newline here
modules/drivers/redshift/test/metabase/driver/redshift_test.clj
Outdated
Show resolved
Hide resolved
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
@qnkhuat Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone? |
Similiar to #40034 but for redshift