Skip to content

Conversation

@tstirrat15
Copy link
Collaborator

Description

Counterpart to authzed/spicedb#2785. This PR should be held until v1.49.0 is released.

This adds documentation for the self feature implemented in the aforementioned PR.

Changes

  • Add some spacing around inline playgrounds
  • Rename "self" relations to "loop" relations in the attributes doc
  • Reorder attributes doc to put "loop" relations above wildcards (since they should be preferred)
  • Add section on the self keyword to the schema reference page

Testing

Review

@vercel
Copy link
Contributor

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs Ready Ready Preview, Comment Jan 23, 2026 8:59pm

Request Review

only view a document if the user is related to the document as viewer and editing is enabled for the
document (this is the same authorization logic used in the wildcard example above).

In the example below, to enable editing for a document, a self relationship using the `edit_enabled` relation must be written.
Copy link
Contributor

@miparnisari miparnisari Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the example below, to enable editing for a document, a self relationship using the `edit_enabled` relation must be written.
To enable editing for a document, a loop relationship using the `edit_enabled` relation must be written.

please do a search in the entire repo for "self" and make sure we change to "loop" where applicable

Self relationships relate an object to itself.
A self relationship is walked with an [arrow](/spicedb/concepts/schema#--arrow) back to an object's self.
Loop relationships relate an object to itself.
A loop relationship is walked with an [arrow](/spicedb/concepts/schema#--arrow) back to an object's self.
Copy link
Contributor

@miparnisari miparnisari Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i still don't know what a loop relationship is and this is talking about how it is used. i'd remove this line, we mention the arrow down below with the example

tstirrat15 and others added 2 commits January 23, 2026 13:49
Co-authored-by: Maria Ines Parnisari <maria.ines.parnisari@authzed.com>
Co-authored-by: Maria Ines Parnisari <maria.ines.parnisari@authzed.com>
Co-authored-by: Maria Ines Parnisari <maria.ines.parnisari@authzed.com>
@tstirrat15 tstirrat15 force-pushed the document-new-self-feature branch from 4903b78 to 5e37c89 Compare January 23, 2026 20:58
@tstirrat15 tstirrat15 merged commit cc0a9b7 into main Jan 23, 2026
11 of 12 checks passed
@tstirrat15 tstirrat15 deleted the document-new-self-feature branch January 23, 2026 21:01
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants