Hacker News new | past | comments | ask | show | jobs | submit login

This sounds really elegant, I love it. Have you seen this deployed in a service-oriented architecture or primarily integrated as part of a single app/db?



Both. Usually the service has a table of "shares" and the owner(s) attached to the actual row. Thus determining if a user has a right to do something looks like this:

    select 1 from kites k 
    join shares s on (s.model = 'kites' and :operation in s.rights)
    where :user in k.owner or s.user = :user
or something like that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: