Adding permissions to models in my ODM #2

Posted by & filed under Javascript, Node.js, Work.

I’ve spent about a day working on adding permissions to the model. Here are intermediary conclusions: We need to pass user session to model’s permission checker method is_allowed() in order to know session user roles and other data (e.g. company ID). We need to check permissions and cache results at the same time we initialize model… Read more »

Adding permissions to models in my ODM #1

Posted by & filed under Javascript, Node.js, Work.

I just started working on adding permissions to models in my WIP Prometheus ODM. The idea is that I, a developer, want to describe granular access rules to resources. I am going to deal with the most common access types: CRUD (Create, Read, Update, Destroy) + Transfer. In a typical system there also most generic role… Read more »

Node.js ORM: work in progress

Posted by & filed under Javascript, Node.js, Work.

This is about a WIP project of making an ORM for Node.js with pluggable adapters, with code name “Prometheus”: https://github.com/shubik/prometheus The idea was to make a simple ORM with a fairly standard API (get, set, save, destroy, etc.) with adapters for different databases which pretty much offer CRUD and a couple extra convenience methods. We… Read more »