这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@joshainglis
Copy link
Contributor

Description

Currently, the console checks is_updatable, and is_insertable_into to check whether to display permissions for insert, update and delete. However, for slightly more complex view with an associated INSTEAD OF trigger, the is_updatable, and is_insertable_into might be 'NO', while the is_trigger_insertable_into, is_trigger_updatable, is_trigger_deletable columns might be 'YES'. In this case, we would still like to be able to set permissions for these operations.

Affected components

  • Console

Related Issues

#2667

Solution and Design

This PR adds in checks for the is_trigger_* columns when determining whether to display insert, update, and delete permissions.

Steps to test and verify

See #2667 for an example schema for testing and verifying the fix.

Limitations, known bugs & workarounds

This PR is fairly minimal in terms of adding in use of the necessary columns. However, given that hdb_catalog.hdb_table_info_agg.view_info also exposes required information more concisely, it might be worth looking into replacing the entire information_schema query with one to hdb_catalog.hdb_table_info_agg, for the purposes of centralising logic, but that's well out of scope for this PR.

Add the use of views.is_trigger_(inser|upda|dele)table cols to determine
if a view can be inserted_into, updated or deleted
@joshainglis joshainglis requested a review from rikinsk-zz as a code owner August 5, 2019 03:27
@netlify
Copy link

netlify bot commented Aug 5, 2019

Deploy preview for hasura-docs ready!

Built with commit 6b9cbbc

https://deploy-preview-2668--hasura-docs.netlify.com

@hasura-bot
Copy link
Contributor

Review app for commit 6b9cbbc deployed to Heroku: https://hge-ci-pull-2668.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2668-6b9cbbcb

@joshainglis
Copy link
Contributor Author

Failed test seems unrelated? Looks like a JWT timeout test.

Copy link
Contributor

@wawhal wawhal left a comment

Choose a reason for hiding this comment

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

LGTM

@rikinsk-zz rikinsk-zz merged commit d19491c into hasura:master Aug 5, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-2668.herokuapp.com is deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants