Home Restrict access to data to grails
Reply: 0

Restrict access to data to grails

катя12
1#
катя12 Published in 2018-02-08 10:21:51Z

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

grails v3.3.0

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306728 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO