[Catalyst] Applying a global SQL filter on REST controller.

Rajesh Kumar Mallah mallah at redgrape.tech
Mon Feb 6 05:25:55 GMT 2017


Dear Catalyst Experts/Users/Hackers,

Please guide for the below situation,
I have put reasonable effort by searching on online
resources.


We have an application backed by SQL tables that stores
data of multiple customers in same table . We have
many such tables and all of them bear a column customer_id
for separating the records of one customer to another.


The security isolation requirement is that one customer should
not get to see records of other customer. What i have in mind
is to append an SQL filter customer_id = << customer_id of logged in
customer >>
at a global level . The controller modules for each database table are
being (auto)generated by the helper
Catalyst::Helper::Controller::DBIC::API::REST The dataset is being exposed
via REST utilising
Catalyst::Controller::DBIC::API

Can anyone please guide where such a constraint can be put ?

Regds
Rajesh Kumar Mallah.








More information about the Catalyst mailing list