Access insert values from policy

Hi i'm struggling for create a policy that check the inserted values, i have a "like button" function where i pass the "profile_id" of the user how i can check if this profile_id is belonging to the authenticated user? Also i need to check the like count based on the "post_id"
Was this page helpful?