pallets-eco/flask-admin

`can_set_page_size` does not prevent custom page sizes

samuelhwilliams opened this issue · 0 comments

I'm not sure if this is just an incorrect assumption on my part, but my understanding was that can_set_page_size would prevent a user from customising the page size away from the default.

It looks like all it does it stop the page size dropdown rendering on the page, but that if you put page_size in the URL params directly you can still customise the page size.

I'm only playing with flask-admin for now, but I decided to toggle can_set_page_size = False on one of the views because I'm listing a number of related fields on the list display, which is causing the number of SQL queries to scale linearly with the number of results displayed. While it would be nice to fix that separately (if possible), it feels like the obvious behaviour of can_set_page_size is to actually stop the user from changing it.

Is the current behaviour intentional, or accidental?