spiral-project / daybed

Form validation and data storage API
http://daybed.rtfd.org/
BSD 3-Clause "New" or "Revised" License
53 stars 8 forks source link

Get collection of my records #179

Closed leplatrem closed 9 years ago

leplatrem commented 9 years ago

Wouldn't it relevant to filter the returned results of the get_records view ? If I have the _read_allrecords permission, I get them all. If I only have _read_myrecords, I get mine only.

Simple use case : a todolist application, one model for all users, all records are private. When opening the app on a new device, users synchronize their empty local storages with the collection returned by /models/todoapp/records/

leplatrem commented 9 years ago

related #90

Natim commented 9 years ago

Yes it would make sense also, I don't know if we can route view on permissions.

almet commented 9 years ago

Good idea. We can probably add some principals to the user to let the view know what it should do.

Natim commented 9 years ago

I have implemented a patch for this here:

leplatrem commented 9 years ago

I lack of time to review all of this I am very sorry :| (I receive a lot of notifications, which all look like good news to me :D, go on guyz!)

leplatrem commented 9 years ago

Usually I prefer dedicated pull-requests, easier to review and catch on :)

Natim commented 9 years ago

Yes I know but I did it as part as other changes.