Well, simple solution I can think of right away is author_id column. With author(s) set you just need to do a check, it can be "author" filter. It depends on your preferences and action you are performing, where to place the author condition.
Hi Belar,
Thanks for that, yes I have a user_id set on each item, was just looking for a pointer as to the best way to list and restrict editing to the owner.
As I said I am new to Laravel so unsure of the best way to do this.
If someoen couuld point me to some code or a tutorial I would be greatful.
Hi vool,
I am interested in a very same thing, I am sure there is a lot of ways how this could be done, so it would be great to know what is considered as a best practice around this topic. Is 'row level permissions' a term which is used to describe what we are looking for?
I just compare the user_id of a record with the user id inside the session. You could write a function for you controllers or a filter.
Should be an easy and good way.
...looks like when I was replying in this thread, Philip Brown was busy writing his next blog post:
http://culttt.com/2014/03/31/multi-tenancy-laravel-4/
and I think it is something that we were looking for - although for me at the moment it is still quite difficult to understand all aspects, I will need to read it couple of times I guess :)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community