graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Row insert permissions for actions

Open THPubs opened this issue 5 years ago • 6 comments

Is it possible to add Row insert permissions to actions as in the tables? It would be better if we can construct custom permission logic. I currently have a custom logic built and cloned to every table in the app. But actions doesn't have the capability to add such logic.

THPubs avatar May 17 '20 05:05 THPubs

@THPubs Could you share an example of a row level permission for an action that you would expect

rikinsk avatar Jun 02 '20 12:06 rikinsk

@rikinsk Sorry for the delay. Let's say something like this:

Screenshot 2020-07-14 at 12 18 18

THPubs avatar Jul 14 '20 06:07 THPubs

Any update on this? Would really like to see this feature. Thanks.

dpd4466 avatar Nov 11 '21 13:11 dpd4466

Can we expect this to be in the works any time soon? This is a very crucial missing feature for actions. Currently there is no way to restrict action calls to external services other than writing a custom action "proxy" with express or something similar.

davidpanic avatar Dec 09 '22 12:12 davidpanic

Hello, do we have any updates on this matter? In my opinion, configuring custom permissions for actions is absolutely necessary. Let's consider the following scenario: I establish update permissions for the users' table like this: {"user_id":{"_eq":"X-Hasura-User-Id"}}, then, due to the requirements of my business logic, I create a Hasura action called "update_user_backend" which involves specific backend validations. However, when a user invokes the "update_user_backend" action, it seems to override the update permissions set in the users' table. As a result, any user gains the ability to modify the information of other users.

didiermis avatar Aug 29 '23 01:08 didiermis

Hi, I want to update that we are launching Hasura V3 (DDN) this month. Rewriting Hasura in V3 allowed us to support all kind of features around actions that were limited in V2. V3 supports feature called "Argument presets" for Commands (Actions in V2), which can allow adding session variables as input arguments for the purpose of restricting access.

I would highly suggest to join us to see the full power of Hasura DDN at the Hasura Dev Day on April 16 🎉. Sign up here: https://hasura.io/dev-day. Can't make it? Sign up anyway and we'll send you the recording.

manasag avatar Apr 11 '24 14:04 manasag