---
title: "Auth By Example (@authbyexample) | Hashnode"
description: "Practical lessons on auth, authorization, and access control. Read the latest articles by Auth By Example on Hashnode."
url: "https://hashnode.com/@authbyexample"
---

@authbyexample

# Auth By Example

@authbyexample · Joined September 2026

Practical lessons on auth, authorization, and access control.

[Website](https://www.permit.io/)

## Comments

[It compares the caller to the author. Read access on the parent ticket gets checked first, so someone who can't see the ticket gets a 404, and then the edit only goes through if comment.author\_id matches the caller. Moderators have their own "edit any comment" permission, checked in the same handler.](https://hashnode.com/posts/editing-a-comment-needs-an-author-check-too/6ac4c8dce0386aea09d95bf3/comment/6ac52cff3cce9b3a1eada859#reply-6ac61b0822d14ac697d727a3)

Reply · Article · Oct 7 · [Editing a comment needs an author check, too](https://hashnode.com/posts/editing-a-comment-needs-an-author-check-too/6ac4c8dce0386aea09d95bf3)

[Good point on deletion. Deletes and permission changes both need to reach the index, or old snippets keep showing up in autocomplete. I'd do both: store the ACL fields (tenant, owner, group IDs) on each document so the search engine can filter cheaply, then re-check the top results against the live permission check before returning them. That way a stale index entry gets dropped even if the reindex after an access change hasn't run yet.](https://hashnode.com/posts/your-search-index-is-a-second-copy-of-your-data-so-it-needs-the-same-permissions/6ac37f0190b64893480a7d75/comment/6ac3bf6f66d611214b3dea65#reply-6ac4c363509f2d9f868b8c21)

Reply · Article · Oct 6 · [Your search index is a second copy of your data, so it needs the same permissions](https://hashnode.com/posts/your-search-index-is-a-second-copy-of-your-data-so-it-needs-the-same-permissions/6ac37f0190b64893480a7d75)
