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

Conversation

@rakeshkky
Copy link
Member

Similar behaviour observed while creating permissions on views.

@rakeshkky rakeshkky added s/do-not-merge Do not merge this pull request to master c/console Related to console c/server Related to server labels Aug 31, 2018
@rakeshkky rakeshkky requested a review from 0x777 August 31, 2018 14:06
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@shahidhk shahidhk changed the title allow mutations on views only if they are updatable/insertable (fix #232) allow mutations on views only if they are allowed by postgres (fix #232) Sep 3, 2018
Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Schema.hs
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@0x777
Copy link
Member

0x777 commented Sep 5, 2018

upserts should not be allowed on views.

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Schema.hs
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@shahidhk
Copy link
Member

shahidhk commented Sep 7, 2018

@rakeshkky What is blocking this PR?

@rakeshkky
Copy link
Member Author

@shahidhk This PR requires few console changes. Console has to allow creating insert/update/delete permissions based on data from information_schema.views table.
@praveenweb ^

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Schema.hs
	server/src-lib/Hasura/RQL/Types/SchemaCache.hs
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

shahidhk pushed a commit to shahidhk/graphql-engine that referenced this pull request Sep 11, 2018
… (hasura#340)

* filestore-docs: added PUT api docs and improved fs docs. Fix hasura#339

* filestore-docs: fixed wrong ref
@karthikvt26 karthikvt26 modified the milestone: Biweekly sprint for console [24 Sep - 5 Oct] Oct 9, 2018
@shahidhk
Copy link
Member

shahidhk commented Oct 9, 2018

@rakeshkky Please resolve server conflicts here too.

Resolve Conflicts:
	server/src-lib/Hasura/GraphQL/Schema.hs
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@CLAassistant
Copy link

CLAassistant commented Oct 10, 2018

CLA assistant check
All committers have signed the CLA.

@karthikvt26
Copy link
Contributor

Test steps:

  1. Test the editable view flow
  • Create a table author with id and name
  • Create the following view to test editable view:
CREATE OR REPLACE VIEW sample."author_article" AS 
 SELECT a.name,
    a.id
   FROM author a
  ORDER BY a.id;
  • Track the view
  • Navigate to the view > permission and you should see insert/update/delete columns activated.
  • Add permission and test in GraphiQL
  1. Test the non-editable view flow
  • Create article table with id, author_id and description
  • Create the following view to test non-editable view:
CREATE OR REPLACE VIEW public."author_article" AS 
 SELECT a.name,
    a.id, ar.description
   FROM author a
   JOIN article ar
   ON a.id = ar.author_id
  ORDER BY a.id;
  • Track the view
  • Navigate to the view > permission and you shouldn't see insert/update/delete columns.

Test can be performed across the schemas.

@rakeshkky Please update in case I have missed any use case.

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@dsandip dsandip removed the s/do-not-merge Do not merge this pull request to master label Oct 12, 2018
@dsandip
Copy link
Member

dsandip commented Oct 12, 2018

@karthikvt26 Let's add a note in the permissions UI to indicate why configuration for insert/update/delete is not available as shown below. Also, if it's not too much of a change, show the columns for insert/update/delete like you would for a regular table but disable the options in them.

permissions for view

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-339.herokuapp.com

@praveenweb
Copy link
Member

praveenweb commented Oct 12, 2018

@karthikvt26 @dsandip - can we enable Insert tab (next to Browse rows) for views that allows mutations?

@shahidhk shahidhk merged commit 49dd7bf into hasura:master Oct 12, 2018
@hasura-bot
Copy link
Contributor

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

hasura-bot pushed a commit that referenced this pull request Mar 12, 2024
V3_GIT_ORIGIN_REV_ID: af7b9083fcde703010a6096d8db65ceade80f58c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console c/server Related to server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants