News for hackers. Stuff that matters.
Re:What ORMs have taught me: just learn SQL (2014) by zimpenfish on Monday December 18, 2017 @08:39AM (#15951490)
> The ORM we use automatically applies security access rules to the queries, for example.

But surely that's better handled in the database itself?

Re:What ORMs have taught me: just learn SQL (2014) by icebraining on Monday December 18, 2017 @09:22AM (#15951750)
How would you apply user-configured security rules in the database?
Re:What ORMs have taught me: just learn SQL (2014) by zimpenfish on Monday December 18, 2017 @11:46AM (#15952967)
Good question. It would depend what kind of rules they were and how they were configured. Wasn't specified that they were "user-configured" in the original statement, though.
Re:What ORMs have taught me: just learn SQL (2014) by icebraining on Monday December 18, 2017 @12:06PM (#15953136)
Fair enough, ours are :)

The kind of rules we use are boolean expressions that identify which rows the user's groups can read/write/delete. The ORM automatically combines all the rules as a single expression and applies it to the query.

Re:What ORMs have taught me: just learn SQL (2014) by zimpenfish on Monday December 18, 2017 @12:23PM (#15953311)
As best I can tell, Postgres lets you do this albeit constraining your boolean checks to things you can efficiently do in the database. But then I can definitely see how this could get unwieldy very quickly.

https://www.postgresql.org/docs/9.5/static/ddl-rowsecurity.h...

Re:What ORMs have taught me: just learn SQL (2014) by icebraining on Monday December 18, 2017 @12:40PM (#15953467)
I know about row-level security, but I don't think the rules can be dynamically loaded.