There is a large table with data.
On the site, each user is given access only to a certain set of data from the table (a selection is made according to certain criteria).
But in the URL line, he can change the number to get access to any data from the table.
How can I restrict access to data from the URL string?
For example: there is a table of goods. 1 and 3 are available to the user. URL: shop.com/goods/show/1 or shop.com/goods/show/3
but he can also go and see the goods under the numbers 2 - shop.com/goods/show/2.
How can this be avoided?
I created a domain class, based on it I created a table. The controller was created automatically with the basic methods of index, show, edit, etc. I make a selection using the createCriteria() in the index method