specific-silverS
Refine3y ago
8 replies
specific-silver

useCan() Based off Page Access

Hi!

I'm currently using the following for action access on a table.

const { data: canAccess } = useCan({
        resource: resource,
        action: "field",
        params: { field: "actions" },
    })


However, I'd like to avoid adding field permissions for each user type. Rather, I'd like to have it so that anyone with access to the resource page in the first place can view it. How could I change this?
Was this page helpful?