Skip to content
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

Control user rights #2489

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Control user rights #2489

wants to merge 1 commit into from

Conversation

jyritali
Copy link

Control if user had rights to INSERT, UPDATE OR DELETE on table

Please add releveant entry to changelog

Control if user had rights to INSERT, UPDATE OR DELETE
@jyritali
Copy link
Author

My PostgRest usage problem, is that I Wan't to allow only Select (GET) commands on tables to PostgRest.

@wolfgangwalther
Copy link
Member

Please add tests showing the change in behavior.

@jyritali
Copy link
Author

Sry i'm not so good in Haskell or Phyton to write test for it.

@wolfgangwalther wolfgangwalther marked this pull request as draft September 27, 2022 12:09
@steve-chavez
Copy link
Member

My PostgRest usage problem, is that I Wan't to allow only Select (GET) commands on tables to PostgRest.

Can you elaborate? Is this only for filtering OpenAPI?

@jyritali
Copy link
Author

My PostgRest usage problem, is that I Wan't to allow only Select (GET) commands on tables to PostgRest.

Can you elaborate? Is this only for filtering OpenAPI?
Yes I can, but this is needed for views to, because you can insert data trough view.

Yes, I don't want to postgRest shows POST, DELETE and PATCH operations, when postgRest postgres role not have permissionts to do these operations.
some pictures:
Swagger shows:
image
postgrest rights to table:
image

When postgRest have only select right to table, then postgRest should show only GET operation for this table.

@wolfgangwalther
Copy link
Member

Sry i'm not so good in Haskell or Phyton to write test for it.

This is essentially an extension of #1824, so the test could look very similar to those introduced there.

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

Successfully merging this pull request may close these issues.

None yet

3 participants