You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also let's ensure that the preview generates a link to the record only when the record's show? is authorized
If show returns false, the preview field is rendered useless, no? It should be hidden too.
I wouldn't go into hiding it automatically and everything, but leave it to the developer to hide it manually if the user is not authorized.
If show returns false, the preview field is rendered useless, no? It should be hidden too.
IMO preview and show are different. You can add 2 fields on preview and allow it for all users and restrict the show view to be visible only for admins.
I wouldn't go into hiding it automatically and everything, but leave it to the developer to hide it manually if the user is not authorized.
This is interesting, one question I have is: where would the developer manually hide it?
Feature
Let's add a
preview?
policy method check that will control whenever the preview field is visible / not, and also when the request is authorized / not.Also let's ensure that the preview generates a link to the record only when the record's
show?
is authorized.preview?
policy checkshow?
to render link to record on preview fieldThe text was updated successfully, but these errors were encountered: