Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Behavior of Update Action for Stored-Procedures in CLI

See original GitHub issue

Stored Procedures require that all the roles be declared with the same CRUD operation.

For instance: A declaration such as anonymous: read and authenticated: create is invalid. Valid declaration would be both anonymous and authenticated roles having either read or create operation.

At the moment, PR #1062 removes the above check from CLI, to allow updating the CRUD operation to any role. Without this, updating the action for any of the roles is not possible.

But, just updating the action of one of the roles without others leaves the config is an invalid state.

One way to prevent this could be to carry the same update to all the roles. For instance: There are two roles anonymous and authenticated configured with read action. anonymous: read, authenticated: read

If the developer wants to update the action for authenticated role to create, then running the CLI can result in a final configuration like this (where all the roles have the same CRUD operation) anonymous:create, authenticated: create

Since stored procedures should have all roles with the same CRUD operation defined, this could be one way to achieve that.

@yorek @sajeetharan @Aniruddh25 Please share your thoughts

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

seantleonardcommented, Jan 3, 2023

As mentioned by @abhishekkumams in #1070 we need to clarify how permissions should be used with stored-procedures with respect to the PUT and PATCH operations. for REST, these HTTP operations require both the create and update permissions because PUT and PATCH either update or create an object. You either have all permissions needed to perform those actions, or are not allowed to perform those operations at all.

severussundarcommented, Jan 24, 2023

This issue tracks the CLI changes needed for 1) Introducing execute operation for stored procedures 2) Introducing new elements methods and operations within rest and graphQL respectively in the schema. Both of them are ways of the developer to specify the exact set of REST/GraphQL actions that is exposed for the stored procedure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI stored procedure commit behavior
The commit behavior of SQL statements, both in a CLI client application and in the called stored procedure running on a Db2® server,...
Read more >
Configuring Stored Procedures Automatic Update
This procedure describes how to schedule the updating of Stored Procedures from a remote server. Scheduling an update of a stored procedure ......
Read more >
c# - Stored procedure MERGE (INSERT OR UPDATE) and ...
In the UPDATE case, SCOPE_IDENTITY() may appear to work, at first, but it is actually returning the value from the last INSERT in...
Read more >
SQL Server Stored Procedure Recompilation Factors
In this article, we will explore in detail the factors that cause SQL Server stored procedures to be recompiled.
Read more >
Stored Procedure Problem - Exits Prematurely?
The stored procedure contains a section of code consisting of 3 simple update statements like those shown below.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found