Showing Relationship Resource data in Dropdown when user doesn't have permission to view the relationship resource #4473
-
example:
` here user doesn't have permission to view head and department resource those policy viewany method returning false, but user have permission to view, create, edit and delete for Party resource. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
When querying the database we don't load all the records into memory and verify if the user has access to each one of the records via policy, this is memory intensive process and often or not will exceed request timeout if you have a fairly large amount of records. To combat this we have |
Beta Was this translation helpful? Give feedback.
When querying the database we don't load all the records into memory and verify if the user has access to each one of the records via policy, this is memory intensive process and often or not will exceed request timeout if you have a fairly large amount of records.
To combat this we have
relatableQuery
and evenindexQuery
to limit the access directly when querying the database. You can read it in the documentation: https://nova.laravel.com/docs/4.0/resources/authorization.html#relatable-filtering