Ability to see BelongsTo field after Nova update from 3 to 4 even though Policy does not allow it #6223
Unanswered
BobbyBorisov
asked this question in
Q&A
Replies: 1 comment
-
|
Hi there, This was an expected changes for Nova 4: https://nova.laravel.com/docs/upgrade.html#authorization-precedence Yes if you need to have such functionality then |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
Hello,
I stumbled on a strange behaviour during update from Nova 3 to Nova 4. Basically I am able to see relations on a resource in Index,Details view even though the Policy for that resource says the user is unable to see it. I can see that in the previous Nova 3 BelongsTo has the following method:
but in Nova 4 that method looks like this
This leads to the behaviour that the users can see certain BelongsTo relations which they previously couldn't. I can see that this check for
authorizedToViewAnyhas been moved in thejsonSerialize()method and looks intentional but I think this leads to different behaviour between the two versions and wanted to ask is it intentional? I couldn't see anything about that behaviour in the upgrade guide though.What is your suggestion to bring back the old behaviour? To have canSee on all of my BelongsTo relations?
Kind regards,
Bobby
Beta Was this translation helpful? Give feedback.
All reactions