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

Conversation

@rakeshkky
Copy link
Member

@rakeshkky rakeshkky commented Aug 7, 2019

Description

Allow altering type of a column even if it is being used in permissions with session variable values.

Affected components

  • Server
  • Tests

Related Issues

close #2070

Solution and Design

  • Add column dependencies with reason sess_var if its permissions are defined only with session variables
  • In run_sql query flow, if column types are altered and sess_var dependant permissions are found then rebuild those permission infos and update the schema cache.

Steps to test and verify

  • Create any permission having a column with session variable
  • Try to alter the type of that column, it should go through.

Limitations, known bugs & workarounds

@rakeshkky rakeshkky added the c/server Related to server label Aug 7, 2019
@rakeshkky rakeshkky requested a review from lexi-lambda as a code owner August 7, 2019 08:53
@rakeshkky rakeshkky self-assigned this Aug 7, 2019
@netlify
Copy link

netlify bot commented Aug 7, 2019

Deploy preview for hasura-docs ready!

Built with commit afcdf64

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

@hasura-bot
Copy link
Contributor

Review app for commit 6d0de6b deployed to Heroku: https://hge-ci-pull-2683.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2683-6d0de6bf

@hasura-bot
Copy link
Contributor

Review app for commit a9600e2 deployed to Heroku: https://hge-ci-pull-2683.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2683-a9600e2d

@rakeshkky rakeshkky added the s/ok-to-merge Status: This pull request can be merged to master label Aug 8, 2019
Copy link
Contributor

@lexi-lambda lexi-lambda left a comment

Choose a reason for hiding this comment

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

This mostly LGTM, aside from the small issue I mentioned wrt the magic constants.

@hasura-bot
Copy link
Contributor

Review app for commit bfbea13 deployed to Heroku: https://hge-ci-pull-2683.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2683-bfbea13d

@hasura-bot
Copy link
Contributor

Review app for commit f974433 deployed to Heroku: https://hge-ci-pull-2683.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2683-f974433c

@hasura-bot
Copy link
Contributor

Review app for commit 9c39e9b deployed to Heroku: https://hge-ci-pull-2683.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2683-9c39e9b7

@hasura-bot
Copy link
Contributor

Review app for commit afcdf64 deployed to Heroku: https://hge-ci-pull-2683.herokuapp.com
Docker image for server: hasura/graphql-engine:pull2683-afcdf64b

@lexi-lambda lexi-lambda merged commit 3527b08 into hasura:master Aug 16, 2019
@hasura-bot
Copy link
Contributor

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

@dsandip dsandip added this to the beta.5 milestone Aug 19, 2019
polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
…ession variables (close hasura#2070) (hasura#2683)

* allow altering type of a column iff session vars are defined in permissions
* use a sum type to define dependency reason
* set jwt expiry test's expiry time to 4 seconds
* derive Data instance for necessary types to simplify 'hasStaticExp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/server Related to server s/ok-to-merge Status: This pull request can be merged to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

altering type of a column is excessively restricted when permissions are defined

4 participants