Code Monkey home page Code Monkey logo

Comments (7)

qustavo avatar qustavo commented on August 25, 2024

I agree, this is one of the problem I was trying to solve, to provide a way to notify that some query has been executed.
Cancel a query execution was implemented I removed later, but it is probably a good idea to have it.
This was a proof of concept, Iยดm working on a better API, but still nothing really usable.
The problem with permissions is not easy to solve using hooks because you need to pass some kind context with extra information, in this case the current user.

from sqlhooks.

nkev avatar nkev commented on August 25, 2024

Thanks. Why not keep it simple and let the calling app be responsible for security?

from sqlhooks.

qustavo avatar qustavo commented on August 25, 2024

Can you elaborate? or give me an example?

from sqlhooks.

nkev avatar nkev commented on August 25, 2024

I'm thinking the sqlhooks would simply be sql hooks. It would be up to the app to determine what to do with an sqlhook callback, including determining if the current user has access to do it. So going back to my original post, a use case might be to stop any query that contains "CREATE TABLE" for users that don't have that permission. The app would determine whether the current user has the permission to "CREATE TABLE".

from sqlhooks.

qustavo avatar qustavo commented on August 25, 2024

sounds good, if you could draft something that would be cool!
Thanks!

from sqlhooks.

qustavo avatar qustavo commented on August 25, 2024

@nkev I've been working on the new API, please take a look at v2 branch.

from sqlhooks.

nkev avatar nkev commented on August 25, 2024

will do

from sqlhooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.